diff options
author | Len Brown <len.brown@intel.com> | 2005-08-05 13:03:06 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 13:03:06 -0400 |
commit | e872d4cace8681838e8d18d52c92f4870e980a08 (patch) | |
tree | 082b75cc52935efae68f9f744bc3f8807f7176c6 /mm/mmap.c | |
parent | 1f3a730117ceda2a7c917d687921fe3c82283968 (diff) | |
parent | 403fe5ae57c831968c3dbbaba291ae825a1c5aaa (diff) | |
download | linux-e872d4cace8681838e8d18d52c92f4870e980a08.tar.bz2 |
Merge ../from-linus
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index da3fa90a0aae..404319477e71 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -143,7 +143,11 @@ int __vm_enough_memory(long pages, int cap_sys_admin) leave 3% of the size of this process for other processes */ allowed -= current->mm->total_vm / 32; - if (atomic_read(&vm_committed_space) < allowed) + /* + * cast `allowed' as a signed long because vm_committed_space + * sometimes has a negative value + */ + if (atomic_read(&vm_committed_space) < (long)allowed) return 0; vm_unacct_memory(pages); |