diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-11-24 08:53:51 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-11 06:34:09 -0500 |
commit | 0ec62d290912bb4b989be7563851bc364ec73b56 (patch) | |
tree | a014d5abbb7573a63537779ccbda0c6962554f04 /arch/sparc/kernel/sys_sparc32.c | |
parent | 935874141df839c706cd6cdc438e85eb69d1525e (diff) |
kill useless checks in sparc mremap variants
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sparc/kernel/sys_sparc32.c')
-rw-r--r-- | arch/sparc/kernel/sys_sparc32.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index 00abe87e5b51..dc0ac197e7e2 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -564,28 +564,6 @@ asmlinkage long sparc32_open(const char __user *filename, | |||
564 | return do_sys_open(AT_FDCWD, filename, flags, mode); | 564 | return do_sys_open(AT_FDCWD, filename, flags, mode); |
565 | } | 565 | } |
566 | 566 | ||
567 | extern unsigned long do_mremap(unsigned long addr, | ||
568 | unsigned long old_len, unsigned long new_len, | ||
569 | unsigned long flags, unsigned long new_addr); | ||
570 | |||
571 | asmlinkage unsigned long sys32_mremap(unsigned long addr, | ||
572 | unsigned long old_len, unsigned long new_len, | ||
573 | unsigned long flags, u32 __new_addr) | ||
574 | { | ||
575 | unsigned long ret = -EINVAL; | ||
576 | unsigned long new_addr = __new_addr; | ||
577 | |||
578 | if (unlikely(sparc_mmap_check(addr, old_len))) | ||
579 | goto out; | ||
580 | if (unlikely(sparc_mmap_check(new_addr, new_len))) | ||
581 | goto out; | ||
582 | down_write(¤t->mm->mmap_sem); | ||
583 | ret = do_mremap(addr, old_len, new_len, flags, new_addr); | ||
584 | up_write(¤t->mm->mmap_sem); | ||
585 | out: | ||
586 | return ret; | ||
587 | } | ||
588 | |||
589 | long sys32_lookup_dcookie(unsigned long cookie_high, | 567 | long sys32_lookup_dcookie(unsigned long cookie_high, |
590 | unsigned long cookie_low, | 568 | unsigned long cookie_low, |
591 | char __user *buf, size_t len) | 569 | char __user *buf, size_t len) |