patch-2.4.15 linux/include/linux/swap.h

Next file: linux/include/linux/sysctl.h
Previous file: linux/include/linux/soundcard.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/include/linux/swap.h linux/include/linux/swap.h
@@ -166,11 +166,9 @@
  */
 #define DEBUG_LRU_PAGE(page)			\
 do {						\
-	if (PageActive(page))			\
-		BUG();				\
-	if (PageInactive(page))			\
+	if (!PageLRU(page))			\
 		BUG();				\
-	if (page_count(page) == 0)		\
+	if (PageActive(page))			\
 		BUG();				\
 } while (0)
 
@@ -185,7 +183,6 @@
 #define add_page_to_inactive_list(page)		\
 do {						\
 	DEBUG_LRU_PAGE(page);			\
-	SetPageInactive(page);		\
 	list_add(&(page)->lru, &inactive_list);	\
 	nr_inactive_pages++;			\
 } while (0)
@@ -200,23 +197,8 @@
 #define del_page_from_inactive_list(page)	\
 do {						\
 	list_del(&(page)->lru);			\
-	ClearPageInactive(page);		\
 	nr_inactive_pages--;			\
 } while (0)
-
-/*
- * Ugly ugly ugly HACK to make sure the inactive lists
- * don't fill up with unfreeable ramdisk pages. We really
- * want to fix the ramdisk driver to mark its pages as
- * unfreeable instead of using dirty buffer magic, but the
- * next code-change time is when 2.5 is forked...
- */
-#ifndef _LINUX_KDEV_T_H
-#include <linux/kdev_t.h>
-#endif
-#ifndef _LINUX_MAJOR_H
-#include <linux/major.h>
-#endif
 
 extern spinlock_t swaplock;
 

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