From: Nick Piggin Date: Wed, 14 Feb 2007 11:35:02 +0000 (+0100) Subject: [PATCH] mincore: CONFIG_SWAP=n fix X-Git-Tag: firefly_0821_release~31213 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30fcffed8149df18592b3e006b829232b7b3844f;p=firefly-linux-kernel-4.4.55.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 95c5f49f0a1a..9780097e3812 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 } } }