patch-2.1.79 linux/mm/filemap.c

Next file: linux/mm/memory.c
Previous file: linux/kernel/sysctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/mm/filemap.c linux/mm/filemap.c
@@ -164,6 +164,8 @@
 
 				/* is it a page cache page? */
 				if (page->inode) {
+					if (page->inode == &swapper_inode)
+						panic ("Shrinking a swap cache page");
 					remove_page_from_hash_queue(page);
 					remove_page_from_inode_queue(page);
 					__free_page(page);
@@ -208,6 +210,8 @@
 		return count;
 	if (!p->inode)
 		return count;
+	if (PageSwapCache(p))
+		panic ("Doing a normal page_unuse of a swap cache page");
 	remove_page_from_hash_queue(p);
 	remove_page_from_inode_queue(p);
 	free_page(page);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov