aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2012-02-12 22:58:52 -0500
committerJames Morris <jmorris@namei.org>2012-02-13 18:45:39 -0500
commit191c542442fdf53cc3c496c00be13367fd9cd42d (patch)
tree4aef9e33a1d99e6530b704243efbe373bb314d61 /mm/mmap.c
parentbbd36568594d091e682a1975ef4ee41d808de0bc (diff)
mm: collapse security_vm_enough_memory() variants into a single function
Collapse security_vm_enough_memory() variants into a single function. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 3f758c7f4c81..db05495d6d0a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1235,7 +1235,7 @@ munmap_back:
1235 */ 1235 */
1236 if (accountable_mapping(file, vm_flags)) { 1236 if (accountable_mapping(file, vm_flags)) {
1237 charged = len >> PAGE_SHIFT; 1237 charged = len >> PAGE_SHIFT;
1238 if (security_vm_enough_memory(charged)) 1238 if (security_vm_enough_memory_mm(mm, charged))
1239 return -ENOMEM; 1239 return -ENOMEM;
1240 vm_flags |= VM_ACCOUNT; 1240 vm_flags |= VM_ACCOUNT;
1241 } 1241 }
@@ -2169,7 +2169,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
2169 if (mm->map_count > sysctl_max_map_count) 2169 if (mm->map_count > sysctl_max_map_count)
2170 return -ENOMEM; 2170 return -ENOMEM;
2171 2171
2172 if (security_vm_enough_memory(len >> PAGE_SHIFT)) 2172 if (security_vm_enough_memory_mm(mm, len >> PAGE_SHIFT))
2173 return -ENOMEM; 2173 return -ENOMEM;
2174 2174
2175 /* Can we just expand an old private anonymous mapping? */ 2175 /* Can we just expand an old private anonymous mapping? */