diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2012-02-12 22:58:52 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-02-13 18:45:39 -0500 |
commit | 191c542442fdf53cc3c496c00be13367fd9cd42d (patch) | |
tree | 4aef9e33a1d99e6530b704243efbe373bb314d61 /mm/mprotect.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/mprotect.c')
-rw-r--r-- | mm/mprotect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index 5a688a2756be..9599fa2d0e92 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -168,7 +168,7 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, | |||
168 | if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_HUGETLB| | 168 | if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_HUGETLB| |
169 | VM_SHARED|VM_NORESERVE))) { | 169 | VM_SHARED|VM_NORESERVE))) { |
170 | charged = nrpages; | 170 | charged = nrpages; |
171 | if (security_vm_enough_memory(charged)) | 171 | if (security_vm_enough_memory_mm(mm, charged)) |
172 | return -ENOMEM; | 172 | return -ENOMEM; |
173 | newflags |= VM_ACCOUNT; | 173 | newflags |= VM_ACCOUNT; |
174 | } | 174 | } |