patch-2.2.0-pre3 linux/mm/vmscan.c

Next file: linux/net/ipv4/ip_masq.c
Previous file: linux/mm/swap_state.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre2/linux/mm/vmscan.c linux/mm/vmscan.c
@@ -162,7 +162,7 @@
 			 * copy in memory, so we add it to the swap
 			 * cache. */
 			if (PageSwapCache(page_map)) {
-				free_page(page);
+				__free_page(page_map);
 				return (atomic_read(&page_map->count) == 0);
 			}
 			add_to_swap_cache(page_map, entry);
@@ -180,7 +180,7 @@
 		 * asynchronously.  That's no problem, shrink_mmap() can
 		 * correctly clean up the occassional unshared page
 		 * which gets left behind in the swap cache. */
-		free_page(page);
+		__free_page(page_map);
 		return 1;	/* we slept: the process may not exist any more */
 	}
 
@@ -194,7 +194,7 @@
 		set_pte(page_table, __pte(entry));
 		flush_tlb_page(vma, address);
 		swap_duplicate(entry);
-		free_page(page);
+		__free_page(page_map);
 		return (atomic_read(&page_map->count) == 0);
 	} 
 	/* 
@@ -564,10 +564,10 @@
 	
 		priority = 5;
 		do {
-			shrink_dcache_memory(priority, gfp_mask);
 			free_memory(shrink_mmap(priority, gfp_mask));
 			free_memory(shm_swap(priority, gfp_mask));
 			free_memory(swap_out(priority, gfp_mask));
+			shrink_dcache_memory(priority, gfp_mask);
 		} while (--priority >= 0);
 		retval = 0;
 done:

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]