diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2012-02-13 03:58:52 +0000 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-02-14 10:45:39 +1100 |
commit | 191c542442fdf53cc3c496c00be13367fd9cd42d (patch) | |
tree | 4aef9e33a1d99e6530b704243efbe373bb314d61 /mm/mmap.c | |
parent | bbd36568594d091e682a1975ef4ee41d808de0bc (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 3f758c7f4c8..db05495d6d0 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1235,7 +1235,7 @@ munmap_back: */ if (accountable_mapping(file, vm_flags)) { charged = len >> PAGE_SHIFT; - if (security_vm_enough_memory(charged)) + if (security_vm_enough_memory_mm(mm, charged)) return -ENOMEM; vm_flags |= VM_ACCOUNT; } @@ -2169,7 +2169,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len) if (mm->map_count > sysctl_max_map_count) return -ENOMEM; - if (security_vm_enough_memory(len >> PAGE_SHIFT)) + if (security_vm_enough_memory_mm(mm, len >> PAGE_SHIFT)) return -ENOMEM; /* Can we just expand an old private anonymous mapping? */ |