Commit 657bec85 authored by Al Viro's avatar Al Viro

ia64, sparc64: convert wrappers around do_mremap() to sys_mremap()

they contain open-coded sys_mremap()
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7696e0c3
...@@ -171,21 +171,8 @@ asmlinkage unsigned long ...@@ -171,21 +171,8 @@ asmlinkage unsigned long
ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags,
unsigned long new_addr) unsigned long new_addr)
{ {
extern unsigned long do_mremap (unsigned long addr, addr = sys_mremap(addr, old_len, new_len, flags, new_addr);
unsigned long old_len, if (!IS_ERR((void *) addr))
unsigned long new_len,
unsigned long flags,
unsigned long new_addr);
down_write(&current->mm->mmap_sem);
{
addr = do_mremap(addr, old_len, new_len, flags, new_addr);
}
up_write(&current->mm->mmap_sem);
if (IS_ERR((void *) addr))
return addr;
force_successful_syscall_return(); force_successful_syscall_return();
return addr; return addr;
} }
......
...@@ -580,16 +580,9 @@ SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len, ...@@ -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_len, unsigned long, flags,
unsigned long, new_addr) unsigned long, new_addr)
{ {
unsigned long ret = -EINVAL;
if (test_thread_flag(TIF_32BIT)) if (test_thread_flag(TIF_32BIT))
goto out; return -EINVAL;
return sys_mremap(addr, old_len, new_len, flags, new_addr);
down_write(&current->mm->mmap_sem);
ret = do_mremap(addr, old_len, new_len, flags, new_addr);
up_write(&current->mm->mmap_sem);
out:
return ret;
} }
/* we come to here via sys_nis_syscall so it can setup the regs argument */ /* we come to here via sys_nis_syscall so it can setup the regs argument */
......
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