mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
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>
This commit is contained in:
parent
bbd3656859
commit
191c542442
8 changed files with 10 additions and 38 deletions
|
@ -355,7 +355,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
|
|||
charge = 0;
|
||||
if (mpnt->vm_flags & VM_ACCOUNT) {
|
||||
unsigned int len = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
|
||||
if (security_vm_enough_memory(len))
|
||||
if (security_vm_enough_memory_mm(oldmm, len)) /* sic */
|
||||
goto fail_nomem;
|
||||
charge = len;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue