summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/sys_sparc_64.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-21 03:20:01 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-21 04:29:13 +0400
commita46ef99d80817a167477ed1c8b4d90ee0c2e726f (patch)
tree3d8c980c627e8b9c009dbf63628a9be8b8d1069f /arch/sparc/kernel/sys_sparc_64.c
parente4eb1ff61b323d6141614e5458a1f53c7046ff8e (diff)
downloadlinux-a46ef99d80817a167477ed1c8b4d90ee0c2e726f.tar.xz
VM: add "vm_munmap()" helper function
Like the vm_brk() function, this is the same as "do_munmap()", except it does the VM locking for the caller. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc/kernel/sys_sparc_64.c')
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index 232df9949530..022e57aadf5d 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -566,15 +566,10 @@ out:
SYSCALL_DEFINE2(64_munmap, unsigned long, addr, size_t, len)
{
- long ret;
-
if (invalid_64bit_range(addr, len))
return -EINVAL;
- down_write(&current->mm->mmap_sem);
- ret = do_munmap(current->mm, addr, len);
- up_write(&current->mm->mmap_sem);
- return ret;
+ return vm_munmap(current->mm, addr, len);
}
extern unsigned long do_mremap(unsigned long addr,