diff options
| author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-09 16:51:35 +0100 |
|---|---|---|
| committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-09 16:51:35 +0100 |
| commit | c973b112c76c9d8fd042991128f218a738cc8d0a (patch) | |
| tree | e813b0da5d0a0e19e06de6462d145a29ad683026 /mm/nommu.c | |
| parent | c5fbc3966f48279dbebfde10248c977014aa9988 (diff) | |
| parent | 00dd1e433967872f3997a45d5adf35056fdf2f56 (diff) | |
Merge with /shiny/git/linux-2.6/.git
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) 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); |
