[PATCH] zone_reclaim: do not unmap file backed pages
zone_reclaim should leave that to the real swapper. We are only interested
in evicting unmapped pages.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 61ca009..8277f93 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -477,6 +477,12 @@
* processes. Try to unmap it here.
*/
if (page_mapped(page) && mapping) {
+ /*
+ * No unmapping if we do not swap
+ */
+ if (!sc->may_swap)
+ goto keep_locked;
+
switch (try_to_unmap(page)) {
case SWAP_FAIL:
goto activate_locked;