summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/task_mmu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 7dcd2a250495..3efa7253523e 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -409,6 +409,9 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
409 } else { 409 } else {
410 spin_unlock(&walk->mm->page_table_lock); 410 spin_unlock(&walk->mm->page_table_lock);
411 } 411 }
412
413 if (pmd_trans_unstable(pmd))
414 return 0;
412 /* 415 /*
413 * The mmap_sem held all the way back in m_start() is what 416 * The mmap_sem held all the way back in m_start() is what
414 * keeps khugepaged out of here and from collapsing things 417 * keeps khugepaged out of here and from collapsing things
@@ -507,6 +510,8 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
507 struct page *page; 510 struct page *page;
508 511
509 split_huge_page_pmd(walk->mm, pmd); 512 split_huge_page_pmd(walk->mm, pmd);
513 if (pmd_trans_unstable(pmd))
514 return 0;
510 515
511 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); 516 pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
512 for (; addr != end; pte++, addr += PAGE_SIZE) { 517 for (; addr != end; pte++, addr += PAGE_SIZE) {
@@ -670,6 +675,8 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
670 int err = 0; 675 int err = 0;
671 676
672 split_huge_page_pmd(walk->mm, pmd); 677 split_huge_page_pmd(walk->mm, pmd);
678 if (pmd_trans_unstable(pmd))
679 return 0;
673 680
674 /* find the first VMA at or above 'addr' */ 681 /* find the first VMA at or above 'addr' */
675 vma = find_vma(walk->mm, addr); 682 vma = find_vma(walk->mm, addr);
@@ -961,6 +968,8 @@ static int gather_pte_stats(pmd_t *pmd, unsigned long addr,
961 spin_unlock(&walk->mm->page_table_lock); 968 spin_unlock(&walk->mm->page_table_lock);
962 } 969 }
963 970
971 if (pmd_trans_unstable(pmd))
972 return 0;
964 orig_pte = pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl); 973 orig_pte = pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
965 do { 974 do {
966 struct page *page = can_gather_numa_stats(*pte, md->vma, addr); 975 struct page *page = can_gather_numa_stats(*pte, md->vma, addr);