X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=mm%2Fnommu.c;h=fd4e8df0f02df979bb2a2de5a891e35f82754a7d;hb=c973b112c76c9d8fd042991128f218a738cc8d0a;hp=ce74452c02d945e40e6cdb503499609f24e1cd64;hpb=3357d4c75f1fb67e7304998c4ad4e9a9fed66fa4;p=powerpc.git diff --git a/mm/nommu.c b/mm/nommu.c index ce74452c02..fd4e8df0f0 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1167,7 +1167,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);