patch-1.3.87 linux/mm/mremap.c

Next file: linux/mm/page_alloc.c
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.86/linux/mm/mremap.c linux/mm/mremap.c
@@ -155,11 +155,11 @@
 
 /*
  * Expand (or shrink) an existing mapping, potentially moving it at the
- * same time (controlled by the "may_move" flag and available VM space)
+ * same time (controlled by the MREMAP_MAYMOVE flag and available VM space)
  */
 asmlinkage unsigned long sys_mremap(unsigned long addr,
 	unsigned long old_len, unsigned long new_len,
-	int may_move)
+	unsigned long flags)
 {
 	struct vm_area_struct *vma;
 
@@ -215,7 +215,7 @@
 	 * We weren't able to just expand or shrink the area,
 	 * we need to create a new one and move it..
 	 */
-	if (!may_move)
-		return -ENOMEM;
-	return move_vma(vma, addr, old_len, new_len);
+	if (flags & MREMAP_MAYMOVE)
+		return move_vma(vma, addr, old_len, new_len);
+	return -ENOMEM;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this