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(); } /*