From 3b10ba30ba48798c995e1c487e9f77d719260049 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Mon, 26 Oct 2009 16:50:00 -0700 Subject: [PATCH] --- yaml --- r: 167750 b: refs/heads/master c: 6a7b95481d49f73991d3dbf8c1e696a24684ac05 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/vmscan.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d24369adaaec..46e2fd75c67e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b05ca7385a2848abdc72051f832722641daed8b0 +refs/heads/master: 6a7b95481d49f73991d3dbf8c1e696a24684ac05 diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index fbcac3bdcf19..777af57fd8c8 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -544,6 +544,16 @@ void putback_lru_page(struct page *page) */ lru = LRU_UNEVICTABLE; add_page_to_unevictable_list(page); + /* + * When racing with an mlock clearing (page is + * unlocked), make sure that if the other thread does + * not observe our setting of PG_lru and fails + * isolation, we see PG_mlocked cleared below and move + * the page back to the evictable list. + * + * The other side is TestClearPageMlocked(). + */ + smp_mb(); } /*