patch-2.3.46 linux/mm/mremap.c
Next file: linux/mm/swapfile.c
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Mon Feb 14 15:31:14 2000
- Orig file:
v2.3.45/linux/mm/mremap.c
- Orig date:
Wed Dec 15 10:43:17 1999
diff -u --recursive --new-file v2.3.45/linux/mm/mremap.c linux/mm/mremap.c
@@ -165,19 +165,14 @@
*
* MREMAP_FIXED option added 5-Dec-1999 by Benjamin LaHaise
* This option implies MREMAP_MAYMOVE.
- *
- * "__new_addr" toying in order to not change the saved stack layout
- * for old x86 binaries that don't want %edi to change..
*/
-asmlinkage unsigned long sys_mremap(unsigned long addr,
+unsigned long do_mremap(unsigned long addr,
unsigned long old_len, unsigned long new_len,
- unsigned long flags, unsigned long __new_addr)
+ unsigned long flags, unsigned long new_addr)
{
- unsigned long new_addr = __new_addr;
struct vm_area_struct *vma;
unsigned long ret = -EINVAL;
- down(¤t->mm->mmap_sem);
if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
goto out;
@@ -287,6 +282,17 @@
ret = move_vma(vma, addr, old_len, new_len, new_addr);
}
out:
+ return ret;
+}
+
+asmlinkage unsigned long sys_mremap(unsigned long addr,
+ unsigned long old_len, unsigned long new_len,
+ unsigned long flags, unsigned long new_addr)
+{
+ unsigned long ret;
+
+ down(¤t->mm->mmap_sem);
+ ret = do_mremap(addr, old_len, new_len, flags, new_addr);
up(¤t->mm->mmap_sem);
return ret;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)