patch-2.0.11 linux/mm/mmap.c

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

diff -u --recursive --new-file v2.0.10/linux/mm/mmap.c linux/mm/mmap.c
@@ -823,7 +823,7 @@
 	 * If the one of the segments is only being partially unmapped,
 	 * it will put new vm_area_struct(s) into the address space.
 	 */
-	while (free) {
+	do {
 		unsigned long st, end;
 
 		mpnt = free;
@@ -840,9 +840,10 @@
 		zap_page_range(current->mm, st, end-st);
 		unmap_fixup(mpnt, st, end-st);
 		kfree(mpnt);
-	}
+	} while (free);
+
+	/* we could zap the page tables here too.. */
 
-	zap_page_range(current->mm, addr, len);
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov