aboutsummaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 4b06b8db9df2..bbac913f96bc 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2206,7 +2206,8 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma,
2206 for (_pte = pte; _pte < pte+HPAGE_PMD_NR; 2206 for (_pte = pte; _pte < pte+HPAGE_PMD_NR;
2207 _pte++, address += PAGE_SIZE) { 2207 _pte++, address += PAGE_SIZE) {
2208 pte_t pteval = *_pte; 2208 pte_t pteval = *_pte;
2209 if (pte_none(pteval) || is_zero_pfn(pte_pfn(pteval))) { 2209 if (pte_none(pteval) || (pte_present(pteval) &&
2210 is_zero_pfn(pte_pfn(pteval)))) {
2210 if (!userfaultfd_armed(vma) && 2211 if (!userfaultfd_armed(vma) &&
2211 ++none_or_zero <= khugepaged_max_ptes_none) 2212 ++none_or_zero <= khugepaged_max_ptes_none)
2212 continue; 2213 continue;