patch-2.4.14 linux/mm/swap_state.c

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

diff -u --recursive --new-file v2.4.13/linux/mm/swap_state.c linux/mm/swap_state.c
@@ -23,8 +23,7 @@
  */
 static int swap_writepage(struct page *page)
 {
-	if (exclusive_swap_page(page)) {
-		delete_from_swap_cache(page);
+	if (remove_exclusive_swap_page(page)) {
 		UnlockPage(page);
 		return 0;
 	}
@@ -82,7 +81,6 @@
 		INC_CACHE_INFO(exist_race);
 		return -EEXIST;
 	}
-	SetPageUptodate(page);
 	if (!PageLocked(page))
 		BUG();
 	if (!PageSwapCache(page))
@@ -119,8 +117,7 @@
 	if (!PageLocked(page))
 		BUG();
 
-	if (block_flushpage(page, 0))
-		lru_cache_del(page);
+	block_flushpage(page, 0);
 
 	entry.val = page->index;
 
@@ -148,8 +145,7 @@
 	 * 					- Marcelo
 	 */
 	if (PageSwapCache(page) && !TryLockPage(page)) {
-		if (exclusive_swap_page(page))
-			delete_from_swap_cache(page);
+		remove_exclusive_swap_page(page);
 		UnlockPage(page);
 	}
 	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)