aboutsummaryrefslogtreecommitdiff
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-20 21:57:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-04-21 01:58:20 -0400
commitbfce281c287a427d0841fadf5d59242757b4e620 (patch)
treeabca9ebeef4c668021e85e4d54e6e779121e92cc /mm/mmap.c
parent9f3a4afb276e4d8b3be7f3e678d4dbd11470416f (diff)
kill mm argument of vm_munmap()
it's always current->mm Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index b38b47ef1f7..848ef52d960 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2134,9 +2134,10 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
}
EXPORT_SYMBOL(do_munmap);
-int vm_munmap(struct mm_struct *mm, unsigned long start, size_t len)
+int vm_munmap(unsigned long start, size_t len)
{
int ret;
+ struct mm_struct *mm = current->mm;
down_write(&mm->mmap_sem);
ret = do_munmap(mm, start, len);
@@ -2148,7 +2149,7 @@ EXPORT_SYMBOL(vm_munmap);
SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
{
profile_munmap(addr);
- return vm_munmap(current->mm, addr, len);
+ return vm_munmap(addr, len);
}
static inline void verify_mm_writelocked(struct mm_struct *mm)