summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-20 16:20:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-20 17:29:13 -0700
commita46ef99d80817a167477ed1c8b4d90ee0c2e726f (patch)
tree3d8c980c627e8b9c009dbf63628a9be8b8d1069f /arch/ia64/kernel
parente4eb1ff61b323d6141614e5458a1f53c7046ff8e (diff)
downloadop-kernel-dev-a46ef99d80817a167477ed1c8b4d90ee0c2e726f.zip
op-kernel-dev-a46ef99d80817a167477ed1c8b4d90ee0c2e726f.tar.gz
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/ia64/kernel')
-rw-r--r--arch/ia64/kernel/perfmon.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 9d0fd7d..2777310 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -605,9 +605,9 @@ pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f)
}
static inline unsigned int
-pfm_do_munmap(struct mm_struct *mm, unsigned long addr, size_t len, int acct)
+pfm_vm_munmap(struct mm_struct *mm, unsigned long addr, size_t len)
{
- return do_munmap(mm, addr, len);
+ return vm_munmap(mm, addr, len);
}
static inline unsigned long
@@ -1473,13 +1473,8 @@ pfm_remove_smpl_mapping(struct task_struct *task, void *vaddr, unsigned long siz
/*
* does the actual unmapping
*/
- down_write(&task->mm->mmap_sem);
-
- DPRINT(("down_write done smpl_vaddr=%p size=%lu\n", vaddr, size));
+ r = pfm_vm_munmap(task->mm, (unsigned long)vaddr, size);
- r = pfm_do_munmap(task->mm, (unsigned long)vaddr, size, 0);
-
- up_write(&task->mm->mmap_sem);
if (r !=0) {
printk(KERN_ERR "perfmon: [%d] unable to unmap sampling buffer @%p size=%lu\n", task_pid_nr(task), vaddr, size);
}
OpenPOWER on IntegriCloud