From 41c70a5aa90f9d4a3f63e337c88891cc2bcd4820 Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Wed, 19 Nov 2008 15:36:37 -0800 Subject: [PATCH] --- yaml --- r: 119193 b: refs/heads/master c: 63eb6b93ce725e4c5f38fc85dd703d49465b03cb h: refs/heads/master i: 119191: 3d7986b6c5ca1de28abad005c435c27383f71572 v: v3 --- [refs] | 2 +- trunk/mm/vmscan.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index bd6f843dc28d..0718d89138dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bda8550deed96687f29992d711a88ea21cff4d26 +refs/heads/master: 63eb6b93ce725e4c5f38fc85dd703d49465b03cb diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index c141b3e78071..f83a7ed5c6c4 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -623,6 +623,8 @@ static unsigned long shrink_page_list(struct list_head *page_list, * Try to allocate it some swap space here. */ if (PageAnon(page) && !PageSwapCache(page)) { + if (!(sc->gfp_mask & __GFP_IO)) + goto keep_locked; switch (try_to_munlock(page)) { case SWAP_FAIL: /* shouldn't happen */ case SWAP_AGAIN: @@ -634,6 +636,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, } if (!add_to_swap(page, GFP_ATOMIC)) goto activate_locked; + may_enter_fs = 1; } #endif /* CONFIG_SWAP */