diff options
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/sysirix.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index 4de155699c4f..7ae4af476974 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c | |||
@@ -581,18 +581,13 @@ asmlinkage int irix_brk(unsigned long brk) | |||
581 | } | 581 | } |
582 | 582 | ||
583 | /* | 583 | /* |
584 | * Check if we have enough memory.. | 584 | * Ok, looks good - let it rip. |
585 | */ | 585 | */ |
586 | if (security_vm_enough_memory((newbrk-oldbrk) >> PAGE_SHIFT)) { | 586 | if (do_brk(oldbrk, newbrk-oldbrk) != oldbrk) { |
587 | ret = -ENOMEM; | 587 | ret = -ENOMEM; |
588 | goto out; | 588 | goto out; |
589 | } | 589 | } |
590 | |||
591 | /* | ||
592 | * Ok, looks good - let it rip. | ||
593 | */ | ||
594 | mm->brk = brk; | 590 | mm->brk = brk; |
595 | do_brk(oldbrk, newbrk-oldbrk); | ||
596 | ret = 0; | 591 | ret = 0; |
597 | 592 | ||
598 | out: | 593 | out: |