From: Nick Piggin Date: Wed, 14 Feb 2007 11:35:02 +0000 (+0100) Subject: [PATCH] mincore: CONFIG_SWAP=n fix X-Git-Tag: v2.6.21-rc1~182 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=30fcffed8149df18592b3e006b829232b7b3844f;p=linux-2.6-omap-h63xx.git [PATCH] mincore: CONFIG_SWAP=n fix Fix mincore-anon patch to compile with CONFIG_SWAP=n Signed-off-by: Nick Piggin Signed-off-by: Linus Torvalds --- diff --git a/mm/mincore.c b/mm/mincore.c index 95c5f49f0a1..9780097e381 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -116,8 +116,13 @@ static long do_mincore(unsigned long addr, unsigned char *vec, unsigned long pag /* migration entries are always uptodate */ present = 1; } else { +#ifdef CONFIG_SWAP pgoff = entry.val; present = mincore_page(&swapper_space, pgoff); +#else + WARN_ON(1); + present = 1; +#endif } } }