Re: PROBLEM: Doesn't compile without CONFIG_SWAP

From: Hugh Dickins
Date: Tue Apr 13 2004 - 11:06:51 EST


On Tue, 13 Apr 2004, haael wrote:
> I was compiling Linux 2.6.5 with -mjb1 patch, trying to get as small
> kernel as possible. I got an error:
> <code>
> CC mm/vmscan.o
> mm/vmscan.c: In function `refill_inactive_zone':
> mm/vmscan.c:650: `swapper_space' undeclared (first use in this function)

Thanks, below should be the right fix (total_swapcache_pages is defined
to swapper_space.nrpages when CONFIG_SWAP=y, to 0 when CONFIG_SWAP=n).

--- 2.6.5-mjb1/mm/vmscan.c 2004-04-10 10:43:46.000000000 +0100
+++ linux/mm/vmscan.c 2004-04-13 16:58:35.009183744 +0100
@@ -647,7 +647,7 @@ refill_inactive_zone(struct zone *zone,
*/
si_meminfo(&i);
app_centile = 100 - ((i.freeram + get_page_cache_size() -
- swapper_space.nrpages) / (i.totalram / 100));
+ total_swapcache_pages) / (i.totalram / 100));

/*
* swap_centile is the percentage of the last (sizeof physical

-
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/