[PATCH] fix mm/memory for SWAP=n

From: Randy.Dunlap
Date: Tue Oct 07 2003 - 15:50:10 EST



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 <rddunlap@xxxxxxxx>
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(-)


diff -Naurp ./include/linux/swap.h~noswap ./include/linux/swap.h
--- ./include/linux/swap.h~noswap 2003-10-07 13:12:15.000000000 -0700
+++ ./include/linux/swap.h 2003-10-07 13:40:52.000000000 -0700
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/