patch-2.4.0-test12 linux/mm/swap_state.c

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

diff -u --recursive --new-file v2.4.0-test11/linux/mm/swap_state.c linux/mm/swap_state.c
@@ -17,8 +17,15 @@
 
 #include <asm/pgtable.h>
 
+static int swap_writepage(struct page *page)
+{
+	rw_swap_page(WRITE, page, 0);
+	return 0;
+}
+
 static struct address_space_operations swap_aops = {
-	sync_page: block_sync_page
+	writepage: swap_writepage,
+	sync_page: block_sync_page,
 };
 
 struct address_space swapper_space = {
@@ -106,6 +113,7 @@
 		lru_cache_del(page);
 
 	spin_lock(&pagecache_lock);
+	ClearPageDirty(page);
 	__delete_from_swap_cache(page);
 	spin_unlock(&pagecache_lock);
 	page_cache_release(page);

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