aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-30 11:55:49 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-30 21:04:57 -0400
commit4ad310b836d5c61ac6e9b5fd7db12d0cd57136d7 (patch)
treeae380c41e03edefad14a7afe3b9cfd9f19acbe5b /arch/ia64
parent63a81db13205f21047a0799adfd3a2419f190577 (diff)
ia64 perfmon: fix get_unmapped_area() use there
get_unmapped_area() returns -E... on failure, not 0. Moreover, the wrapper around it is completely pointless. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/perfmon.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index f00ba025375d..d7f558c1e711 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -604,12 +604,6 @@ pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f)
604 spin_unlock(&(x)->ctx_lock); 604 spin_unlock(&(x)->ctx_lock);
605} 605}
606 606
607static inline unsigned long
608pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags, unsigned long exec)
609{
610 return get_unmapped_area(file, addr, len, pgoff, flags);
611}
612
613/* forward declaration */ 607/* forward declaration */
614static const struct dentry_operations pfmfs_dentry_operations; 608static const struct dentry_operations pfmfs_dentry_operations;
615 609
@@ -2333,8 +2327,8 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
2333 down_write(&task->mm->mmap_sem); 2327 down_write(&task->mm->mmap_sem);
2334 2328
2335 /* find some free area in address space, must have mmap sem held */ 2329 /* find some free area in address space, must have mmap sem held */
2336 vma->vm_start = pfm_get_unmapped_area(NULL, 0, size, 0, MAP_PRIVATE|MAP_ANONYMOUS, 0); 2330 vma->vm_start = get_unmapped_area(NULL, 0, size, 0, MAP_PRIVATE|MAP_ANONYMOUS);
2337 if (vma->vm_start == 0UL) { 2331 if (IS_ERR_VALUE(vma->vm_start)) {
2338 DPRINT(("Cannot find unmapped area for size %ld\n", size)); 2332 DPRINT(("Cannot find unmapped area for size %ld\n", size));
2339 up_write(&task->mm->mmap_sem); 2333 up_write(&task->mm->mmap_sem);
2340 goto error; 2334 goto error;