git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] include/asm-i386/: "extern inline" -> "static inline"
[pandora-kernel.git]
/
mm
/
nommu.c
diff --git
a/mm/nommu.c
b/mm/nommu.c
index
ce74452
..
fd4e8df
100644
(file)
--- 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;
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);
return 0;
vm_unacct_memory(pages);