patch-2.3.99-pre4 linux/include/linux/swap.h

Next file: linux/include/linux/tty.h
Previous file: linux/include/linux/sunrpc/xdr.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/include/linux/swap.h linux/include/linux/swap.h
@@ -154,7 +154,7 @@
 		return 1;
 	count = page_count(page);
 	if (PageSwapCache(page))
-		count += swap_count(page) - 2;
+		count += swap_count(page) - 2 - !!page->buffers;
 	return  count > 1;
 }
 
@@ -173,6 +173,8 @@
 
 #define	lru_cache_del(page)			\
 do {						\
+	if (!PageLocked(page))			\
+		BUG();				\
 	spin_lock(&pagemap_lru_lock);		\
 	list_del(&(page)->lru);			\
 	nr_lru_pages--;				\

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