diff options
Diffstat (limited to 'mm/nommu.c')
-rw-r--r-- | mm/nommu.c | 6 |
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); |