aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/kernel/sys_ia64.c19
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c11
2 files changed, 5 insertions, 25 deletions
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
index 609d50056a6c..d9439ef2f661 100644
--- a/arch/ia64/kernel/sys_ia64.c
+++ b/arch/ia64/kernel/sys_ia64.c
@@ -171,22 +171,9 @@ asmlinkage unsigned long
171ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, 171ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags,
172 unsigned long new_addr) 172 unsigned long new_addr)
173{ 173{
174 extern unsigned long do_mremap (unsigned long addr, 174 addr = sys_mremap(addr, old_len, new_len, flags, new_addr);
175 unsigned long old_len, 175 if (!IS_ERR((void *) addr))
176 unsigned long new_len, 176 force_successful_syscall_return();
177 unsigned long flags,
178 unsigned long new_addr);
179
180 down_write(&current->mm->mmap_sem);
181 {
182 addr = do_mremap(addr, old_len, new_len, flags, new_addr);
183 }
184 up_write(&current->mm->mmap_sem);
185
186 if (IS_ERR((void *) addr))
187 return addr;
188
189 force_successful_syscall_return();
190 return addr; 177 return addr;
191} 178}
192 179
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index 3ee51f189a55..275f74fd6f6a 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -580,16 +580,9 @@ SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len,
580 unsigned long, new_len, unsigned long, flags, 580 unsigned long, new_len, unsigned long, flags,
581 unsigned long, new_addr) 581 unsigned long, new_addr)
582{ 582{
583 unsigned long ret = -EINVAL;
584
585 if (test_thread_flag(TIF_32BIT)) 583 if (test_thread_flag(TIF_32BIT))
586 goto out; 584 return -EINVAL;
587 585 return sys_mremap(addr, old_len, new_len, flags, new_addr);
588 down_write(&current->mm->mmap_sem);
589 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
590 up_write(&current->mm->mmap_sem);
591out:
592 return ret;
593} 586}
594 587
595/* we come to here via sys_nis_syscall so it can setup the regs argument */ 588/* we come to here via sys_nis_syscall so it can setup the regs argument */