patch-2.2.1 linux/mm/mmap.c

Next file: linux/CREDITS
Previous file: linux/include/asm-i386/page.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0/linux/mm/mmap.c linux/mm/mmap.c
@@ -393,6 +393,7 @@
 			} else {
 				/* Then go through the AVL tree quickly. */
 				struct vm_area_struct * tree = mm->mmap_avl;
+				vma = NULL;
 				for (;;) {
 					if (tree == vm_avl_empty)
 						break;
@@ -556,7 +557,7 @@
 	unsigned long start, unsigned long end)
 {
 	unsigned long first = start & PGDIR_MASK;
-	unsigned long last = (end & PGDIR_MASK) + PGDIR_SIZE;
+	unsigned long last = (end + PGDIR_SIZE - 1) & PGDIR_MASK;
 
 	if (!prev) {
 		prev = mm->mmap;


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)