forked from Minki/linux
ia64, sparc64: convert wrappers around do_mremap() to sys_mremap()
they contain open-coded sys_mremap() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
7696e0c37f
commit
657bec850f
@ -171,22 +171,9 @@ asmlinkage unsigned long
|
||||
ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags,
|
||||
unsigned long new_addr)
|
||||
{
|
||||
extern unsigned long do_mremap (unsigned long addr,
|
||||
unsigned long old_len,
|
||||
unsigned long new_len,
|
||||
unsigned long flags,
|
||||
unsigned long new_addr);
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
{
|
||||
addr = do_mremap(addr, old_len, new_len, flags, new_addr);
|
||||
}
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
||||
if (IS_ERR((void *) addr))
|
||||
return addr;
|
||||
|
||||
force_successful_syscall_return();
|
||||
addr = sys_mremap(addr, old_len, new_len, flags, new_addr);
|
||||
if (!IS_ERR((void *) addr))
|
||||
force_successful_syscall_return();
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
@ -580,16 +580,9 @@ SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len,
|
||||
unsigned long, new_len, unsigned long, flags,
|
||||
unsigned long, new_addr)
|
||||
{
|
||||
unsigned long ret = -EINVAL;
|
||||
|
||||
if (test_thread_flag(TIF_32BIT))
|
||||
goto out;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
ret = do_mremap(addr, old_len, new_len, flags, new_addr);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
out:
|
||||
return ret;
|
||||
return -EINVAL;
|
||||
return sys_mremap(addr, old_len, new_len, flags, new_addr);
|
||||
}
|
||||
|
||||
/* we come to here via sys_nis_syscall so it can setup the regs argument */
|
||||
|
Loading…
Reference in New Issue
Block a user