X-Git-Url: http://git.cascardo.info/?p=cascardo%2Flinux.git;a=blobdiff_plain;f=mm%2Frmap.c;h=c5bc241127b205734eaef62964d6d152941174cc;hp=c52f43a69eeaa6517b957093b41f783cb7b2f892;hb=60815cf2e05057db5b78e398d9734c493560b11e;hpb=b258d860652934b5e014408302335430b81bd7ce diff --git a/mm/rmap.c b/mm/rmap.c index c52f43a69eea..c5bc241127b2 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -583,7 +583,8 @@ pmd_t *mm_find_pmd(struct mm_struct *mm, unsigned long address) * without holding anon_vma lock for write. So when looking for a * genuine pmde (in which to find pte), test present and !THP together. */ - pmde = ACCESS_ONCE(*pmd); + pmde = *pmd; + barrier(); if (!pmd_present(pmde) || pmd_trans_huge(pmde)) pmd = NULL; out: @@ -1380,7 +1381,7 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount, /* Nuke the page table entry. */ flush_cache_page(vma, address, pte_pfn(*pte)); - pteval = ptep_clear_flush(vma, address, pte); + pteval = ptep_clear_flush_notify(vma, address, pte); /* If nonlinear, store the file page offset in the pte. */ if (page->index != linear_page_index(vma, address)) {