aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index c8601dd36603..74f875733e2b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -625,15 +625,6 @@ static unsigned long shrink_page_list(struct list_head *page_list,
625 if (PageAnon(page) && !PageSwapCache(page)) { 625 if (PageAnon(page) && !PageSwapCache(page)) {
626 if (!(sc->gfp_mask & __GFP_IO)) 626 if (!(sc->gfp_mask & __GFP_IO))
627 goto keep_locked; 627 goto keep_locked;
628 switch (try_to_munlock(page)) {
629 case SWAP_FAIL: /* shouldn't happen */
630 case SWAP_AGAIN:
631 goto keep_locked;
632 case SWAP_MLOCK:
633 goto cull_mlocked;
634 case SWAP_SUCCESS:
635 ; /* fall thru'; add to swap cache */
636 }
637 if (!add_to_swap(page, GFP_ATOMIC)) 628 if (!add_to_swap(page, GFP_ATOMIC))
638 goto activate_locked; 629 goto activate_locked;
639 may_enter_fs = 1; 630 may_enter_fs = 1;
@@ -752,6 +743,8 @@ free_it:
752 continue; 743 continue;
753 744
754cull_mlocked: 745cull_mlocked:
746 if (PageSwapCache(page))
747 try_to_free_swap(page);
755 unlock_page(page); 748 unlock_page(page);
756 putback_lru_page(page); 749 putback_lru_page(page);
757 continue; 750 continue;