patch-1.3.83 linux/mm/mremap.c

Next file: linux/mm/vmalloc.c
Previous file: linux/mm/mprotect.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.82/linux/mm/mremap.c linux/mm/mremap.c
@@ -93,7 +93,8 @@
 {
 	unsigned long offset = len;
 
-	invalidate_range(mm, old_addr, old_addr + len);
+	flush_cache_range(mm, old_addr, old_addr + len);
+	flush_tlb_range(mm, old_addr, old_addr + len);
 
 	/*
 	 * This is not the clever way to do this, but we're taking the
@@ -115,9 +116,10 @@
 	 * the old page tables)
 	 */
 oops_we_failed:
+	flush_cache_range(mm, new_addr, new_addr + len);
 	while ((offset += PAGE_SIZE) < len)
 		move_one_page(mm, new_addr + offset, old_addr + offset);
-	invalidate_range(mm, new_addr, new_addr + len);
+	flush_tlb_range(mm, new_addr, new_addr + len);
 	zap_page_range(mm, new_addr, new_addr + len);
 	return -1;
 }

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