aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinchan Kim <[email protected]>2011-05-11 15:13:30 -0700
committerLinus Torvalds <[email protected]>2011-05-11 18:50:44 -0700
commitbad49d9c89d8755a1289d68e6d0127a6ee79e119 (patch)
treecae49afedfa97a2ba02dd4e7987e469a60fa2b65
parent52cd4e5c620af9e21b5298bf01844b98573505a7 (diff)
mm: check PageUnevictable in lru_deactivate_fn()
The lru_deactivate_fn should not move page which in on unevictable lru into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages as __isolate_lru_page could return -EINVAL. Reported-by: Ying Han <[email protected]> Tested-by: Ying Han <[email protected]> Signed-off-by: Minchan Kim <[email protected]> Reviewed-by: KOSAKI Motohiro <[email protected]> Reviewed-by: Rik van Riel<[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/swap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/swap.c b/mm/swap.c
index a448db377cb0..5602f1a1b1e7 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -396,6 +396,9 @@ static void lru_deactivate_fn(struct page *page, void *arg)
if (!PageLRU(page))
return;
+ if (PageUnevictable(page))
+ return;
+
/* Some processes are using the page */
if (page_mapped(page))
return;