X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=blobdiff_plain;f=mm%2Fvmscan.c;h=777af57fd8c8c80971d7abaf4edb974e360288c9;hp=fbcac3bdcf1965c3997966ffb5b3979f33684290;hb=9a1607071c293e48b08bd703733480b1d55c7b93;hpb=41e20983fe553b39bc2b00e07c7a379f0c86a4bc diff --git a/mm/vmscan.c b/mm/vmscan.c index fbcac3b..777af57 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -544,6 +544,16 @@ redo: */ 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(); } /*