Commit 4ad310b8 authored by Al Viro's avatar Al Viro

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 63a81db1
...@@ -604,12 +604,6 @@ pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f) ...@@ -604,12 +604,6 @@ pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f)
spin_unlock(&(x)->ctx_lock); spin_unlock(&(x)->ctx_lock);
} }
static inline unsigned long
pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags, unsigned long exec)
{
return get_unmapped_area(file, addr, len, pgoff, flags);
}
/* forward declaration */ /* forward declaration */
static const struct dentry_operations pfmfs_dentry_operations; static const struct dentry_operations pfmfs_dentry_operations;
...@@ -2333,8 +2327,8 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t ...@@ -2333,8 +2327,8 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
down_write(&task->mm->mmap_sem); down_write(&task->mm->mmap_sem);
/* find some free area in address space, must have mmap sem held */ /* find some free area in address space, must have mmap sem held */
vma->vm_start = pfm_get_unmapped_area(NULL, 0, size, 0, MAP_PRIVATE|MAP_ANONYMOUS, 0); vma->vm_start = get_unmapped_area(NULL, 0, size, 0, MAP_PRIVATE|MAP_ANONYMOUS);
if (vma->vm_start == 0UL) { if (IS_ERR_VALUE(vma->vm_start)) {
DPRINT(("Cannot find unmapped area for size %ld\n", size)); DPRINT(("Cannot find unmapped area for size %ld\n", size));
up_write(&task->mm->mmap_sem); up_write(&task->mm->mmap_sem);
goto error; goto error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment