patch-2.4.20 linux-2.4.20/mm/swap.c

Next file: linux-2.4.20/mm/swap_state.c
Previous file: linux-2.4.20/mm/slab.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/mm/swap.c linux-2.4.20/mm/swap.c
@@ -57,9 +57,10 @@
  */
 void lru_cache_add(struct page * page)
 {
-	if (!TestSetPageLRU(page)) {
+	if (!PageLRU(page)) {
 		spin_lock(&pagemap_lru_lock);
-		add_page_to_inactive_list(page);
+		if (!TestSetPageLRU(page))
+			add_page_to_inactive_list(page);
 		spin_unlock(&pagemap_lru_lock);
 	}
 }

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