* [PATCH] fix mm/rmap.c build failure if CONFIG_SWAP is not defined (2.6.10-rc3-bk16)
@ 2004-12-23 23:42 Jesper Juhl
2004-12-24 0:25 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2004-12-23 23:42 UTC (permalink / raw)
To: Rik van Riel; +Cc: linux-kernel
I just tried a allnoconfig build of 2.6.10-rc3-bk16, and it fails on
mm/rmap.c since swap_token_default_timeout is not defined by
include/linux/swap.h if CONFIG_SWAP is not defined. The patch below just
makes the small bit that uses swap_token_default_timeout be conditionally
build depending on CONFIG_SWAP being defined or not, but I have no idea if
this is the proper way to fix this (it does allow it to build though).
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
diff -up linux-2.6.10-rc3-bk16-orig/mm/rmap.c linux-2.6.10-rc3-bk16/mm/rmap.c
--- linux-2.6.10-rc3-bk16-orig/mm/rmap.c 2004-12-23 23:26:50.000000000 +0100
+++ linux-2.6.10-rc3-bk16/mm/rmap.c 2004-12-24 00:36:01.000000000 +0100
@@ -395,9 +395,10 @@ int page_referenced(struct page *page, i
{
int referenced = 0;
+#ifdef CONFIG_SWAP
if (!swap_token_default_timeout)
ignore_token = 1;
-
+#endif
if (page_test_and_clear_young(page))
referenced++;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix mm/rmap.c build failure if CONFIG_SWAP is not defined (2.6.10-rc3-bk16)
2004-12-23 23:42 [PATCH] fix mm/rmap.c build failure if CONFIG_SWAP is not defined (2.6.10-rc3-bk16) Jesper Juhl
@ 2004-12-24 0:25 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2004-12-24 0:25 UTC (permalink / raw)
To: Jesper Juhl; +Cc: riel, linux-kernel
Jesper Juhl <juhl-lkml@dif.dk> wrote:
>
> I just tried a allnoconfig build of 2.6.10-rc3-bk16, and it fails on
> mm/rmap.c since swap_token_default_timeout is not defined by
> include/linux/swap.h if CONFIG_SWAP is not defined.
yup. I have this queued up:
--- 25/include/linux/swap.h~fix-config_swap-n-build Thu Dec 23 14:34:08 2004
+++ 25-akpm/include/linux/swap.h Thu Dec 23 14:34:08 2004
@@ -269,6 +269,7 @@ static inline void put_swap_token(struct
#define move_from_swap_cache(p, i, m) 1
#define __delete_from_swap_cache(p) /*NOTHING*/
#define delete_from_swap_cache(p) /*NOTHING*/
+#define swap_token_default_timeout 0
static inline int remove_exclusive_swap_page(struct page *p)
{
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-24 0:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-23 23:42 [PATCH] fix mm/rmap.c build failure if CONFIG_SWAP is not defined (2.6.10-rc3-bk16) Jesper Juhl
2004-12-24 0:25 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).