Skip to contentSkip to conversation

fix mm/memory for SWAP=n

PATCH New Randy.Dunlap 1 participant 1 message Oct 7, 2003 MM swap

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix mm/memory for SWAP=n

Please apply to 2.6.0-test6-current.

--
~Randy

patch_name: memory_noswap.patch
patch_version: 2003-10-07.13:49:54
author: Randy.Dunlap <[email protected]>
description: fix compile warning when CONFIG_SWAP=n
product: Linux
product_versions: 2.6.0-test6-2003.10.07
diffstat: =

 include/linux/swap.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)
include/linux/swap.h renamed from include/linux/swap.h~noswap +5 -1
diff -Naurp ./include/linux/swap.h~noswap ./include/linux/swap.h
@@ -261,12 +261,16 @@ extern spinlock_t swaplock;
 #define lookup_swap_cache(swp)			NULL
 #define valid_swaphandles(swp, off)		0
 #define can_share_swap_page(p)			0
-#define remove_exclusive_swap_page(p)		0
 #define move_to_swap_cache(p, swp)		1
 #define move_from_swap_cache(p, i, m)		1
 #define __delete_from_swap_cache(p)		/*NOTHING*/
 #define delete_from_swap_cache(p)		/*NOTHING*/
 
+static inline int remove_exclusive_swap_page(struct page *p)
+{
+	return 0;
+}
+
 static inline swp_entry_t get_swap_page(void)
 {
 	swp_entry_t entry;