aboutsummaryrefslogtreecommitdiffstats
path: root/mm/nommu.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-08-10 12:15:13 -0400
committerDave Kleikamp <shaggy@austin.ibm.com>2005-08-10 12:15:13 -0400
commit2d610b80e954045ccfc27558f84e482709e5e5b7 (patch)
tree840b3bb52adba07b6f1e4ddf2beb5ad5df480486 /mm/nommu.c
parent8a9cd6d676728792aaee31f30015d284acd154a3 (diff)
parent86b3786078d63242d3194ffc58ae8dae1d1bbef3 (diff)
Merge with /home/shaggy/git/linus-clean/
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'mm/nommu.c')
-rw-r--r--mm/nommu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/nommu.c b/mm/nommu.c
index ce74452c02d9..fd4e8df0f02d 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1167,7 +1167,11 @@ int __vm_enough_memory(long pages, int cap_sys_admin)
1167 leave 3% of the size of this process for other processes */ 1167 leave 3% of the size of this process for other processes */
1168 allowed -= current->mm->total_vm / 32; 1168 allowed -= current->mm->total_vm / 32;
1169 1169
1170 if (atomic_read(&vm_committed_space) < allowed) 1170 /*
1171 * cast `allowed' as a signed long because vm_committed_space
1172 * sometimes has a negative value
1173 */
1174 if (atomic_read(&vm_committed_space) < (long)allowed)
1171 return 0; 1175 return 0;
1172 1176
1173 vm_unacct_memory(pages); 1177 vm_unacct_memory(pages);