Commit 2860cb86 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] VM overcommit documentation fixes

From: Andy Whitcroft <andyw@uk.ibm.com>

Whilst looking at the memory overcommit logic I noticed that the pointer to
the documentation from the *_vm_enough_memory calls is incorrect.  Also
that in one instance the routine does not have the expected pointers.
parent c1d1c7cd
......@@ -303,7 +303,7 @@ int cap_syslog (int type)
* succeed and -ENOMEM implies there is not.
*
* We currently support three overcommit policies, which are set via the
* vm.overcommit_memory sysctl. See Documentation/vm/overcommit-acounting
* vm.overcommit_memory sysctl. See Documentation/vm/overcommit-accounting
*
* Strict overcommit modes added 2002 Feb 26 by Alan Cox.
* Additional code 2002 Jul 20 by Robert Love.
......
......@@ -101,6 +101,14 @@ static int dummy_syslog (int type)
return 0;
}
/*
* Check that a process has enough memory to allocate a new virtual
* mapping. 0 means there is enough memory for the allocation to
* succeed and -ENOMEM implies there is not.
*
* We currently support three overcommit policies, which are set via the
* vm.overcommit_memory sysctl. See Documentation/vm/overcommit-accounting
*/
static int dummy_vm_enough_memory(long pages)
{
unsigned long free, allowed;
......
......@@ -1491,7 +1491,7 @@ static int selinux_syslog(int type)
* succeed and -ENOMEM implies there is not.
*
* We currently support three overcommit policies, which are set via the
* vm.overcommit_memory sysctl. See Documentation/vm/overcommit-acounting
* vm.overcommit_memory sysctl. See Documentation/vm/overcommit-accounting
*
* Strict overcommit modes added 2002 Feb 26 by Alan Cox.
* Additional code 2002 Jul 20 by Robert Love.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment