[PATCH] mincore: CONFIG_SWAP=n fix
Fix mincore-anon patch to compile with CONFIG_SWAP=n
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/mm/mincore.c b/mm/mincore.c
index 95c5f49..9780097 100644
--- a/mm/mincore.c
+++ b/mm/mincore.c
@@ -116,8 +116,13 @@
/* 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
}
}
}