Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perfmon: kill some helpers and arguments

pfm_vm_munmap() is simply vm_munmap() and pfm_remove_smpl_mapping()
always get current as the first argument.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 9f3a4afb 936af157

+4 -9
+4 -9
arch/ia64/kernel/perfmon.c
··· 604 604 spin_unlock(&(x)->ctx_lock); 605 605 } 606 606 607 - static inline unsigned int 608 - pfm_vm_munmap(struct mm_struct *mm, unsigned long addr, size_t len) 609 - { 610 - return vm_munmap(mm, addr, len); 611 - } 612 - 613 607 static inline unsigned long 614 608 pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags, unsigned long exec) 615 609 { ··· 1452 1458 * a PROTECT_CTX() section. 1453 1459 */ 1454 1460 static int 1455 - pfm_remove_smpl_mapping(struct task_struct *task, void *vaddr, unsigned long size) 1461 + pfm_remove_smpl_mapping(void *vaddr, unsigned long size) 1456 1462 { 1463 + struct task_struct *task = current; 1457 1464 int r; 1458 1465 1459 1466 /* sanity checks */ ··· 1468 1473 /* 1469 1474 * does the actual unmapping 1470 1475 */ 1471 - r = pfm_vm_munmap(task->mm, (unsigned long)vaddr, size); 1476 + r = vm_munmap(current->mm, (unsigned long)vaddr, size); 1472 1477 1473 1478 if (r !=0) { 1474 1479 printk(KERN_ERR "perfmon: [%d] unable to unmap sampling buffer @%p size=%lu\n", task_pid_nr(task), vaddr, size); ··· 1935 1940 * because some VM function reenables interrupts. 1936 1941 * 1937 1942 */ 1938 - if (smpl_buf_vaddr) pfm_remove_smpl_mapping(current, smpl_buf_vaddr, smpl_buf_size); 1943 + if (smpl_buf_vaddr) pfm_remove_smpl_mapping(smpl_buf_vaddr, smpl_buf_size); 1939 1944 1940 1945 return 0; 1941 1946 }