From d7d4fe858df444dad47a8517f05abeb01f10a7c6 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 22 Mar 2006 00:08:45 -0800 Subject: [PATCH] --- yaml --- r: 22481 b: refs/heads/master c: 6e5ef1a96e6e3b123da56292bc35017c8c401491 h: refs/heads/master i: 22479: 52afa3e65ed5b47e116dd844c189aa106b3f65a3 v: v3 --- [refs] | 2 +- trunk/mm/vmscan.c | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 8cde1abca252..78954fab2205 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a7290ee08e434399660ace34427c17696e47c562 +refs/heads/master: 6e5ef1a96e6e3b123da56292bc35017c8c401491 diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index 3914a94aa905..f713e9f6ac73 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -460,12 +460,9 @@ static unsigned long shrink_page_list(struct list_head *page_list, * Anonymous process memory has backing store? * Try to allocate it some swap space here. */ - if (PageAnon(page) && !PageSwapCache(page)) { - if (!sc->may_swap) - goto keep_locked; + if (PageAnon(page) && !PageSwapCache(page)) if (!add_to_swap(page, GFP_ATOMIC)) goto activate_locked; - } #endif /* CONFIG_SWAP */ mapping = page_mapping(page); @@ -477,12 +474,6 @@ static unsigned long shrink_page_list(struct list_head *page_list, * 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, 0)) { case SWAP_FAIL: goto activate_locked; @@ -1205,7 +1196,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, struct pagevec pvec; int reclaim_mapped = 0; - if (unlikely(sc->may_swap)) { + if (sc->may_swap) { long mapped_ratio; long distress; long swap_tendency;