patch-2.0.21-2.1.0 linux/mm/swapfile.c

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

diff -u --recursive --new-file lx2.0/v2.0.21/linux/mm/swapfile.c linux/mm/swapfile.c
@@ -17,6 +17,7 @@
 #include <linux/fs.h>
 #include <linux/swapctl.h>
 #include <linux/blkdev.h> /* for blk_size */
+#include <linux/vmalloc.h>
 
 #include <asm/dma.h>
 #include <asm/system.h> /* for cli()/sti() */
@@ -170,7 +171,7 @@
 		return 0;
 	if (pte_present(pte)) {
 		unsigned long page_nr = MAP_NR(pte_page(pte));
-		if (page_nr >= MAP_NR(high_memory))
+		if (page_nr >= max_mapnr)
 			return 0;
 		if (!in_swap_cache(page_nr))
 			return 0;

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