summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-20 21:57:04 -0400
committerVarun Wadekar <vwadekar@nvidia.com>2012-04-25 12:23:00 +0530
commit60296e85d8a58a7474ebd2a17c9d086a5b27022f (patch)
tree1fac69f26f73f0ccfe8a47789ef432331d1b92f8 /mm
parentaa71f1ee74b5e7d4f5c2350098b2e66b54b8d4c4 (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')
-rw-r--r--mm/mmap.c5
-rw-r--r--mm/nommu.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index b38b47ef1f77..848ef52d9603 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)
diff --git a/mm/nommu.c b/mm/nommu.c
index dd00383be2d9..bb8f4f004a82 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1734,8 +1734,9 @@ erase_whole_vma:
}
EXPORT_SYMBOL(do_munmap);
-int vm_munmap(struct mm_struct *mm, unsigned long addr, size_t len)
+int vm_munmap(unsigned long addr, size_t len)
{
+ struct mm_struct *mm = current->mm;
int ret;
down_write(&mm->mmap_sem);
@@ -1747,7 +1748,7 @@ EXPORT_SYMBOL(vm_munmap);
SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
{
- return vm_munmap(current->mm, addr, len);
+ return vm_munmap(addr, len);
}
/*