mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
[deliverable/linux.git] / mm / swapfile.c
index 00a962caab1acec6eeed984756e573a8c0c64b15..44595a373e421f833fd6cdfcb5c9465966af23ec 100644 (file)
@@ -932,9 +932,7 @@ static inline int unuse_pmd_range(struct vm_area_struct *vma, pud_t *pud,
        pmd = pmd_offset(pud, addr);
        do {
                next = pmd_addr_end(addr, end);
-               if (unlikely(pmd_trans_huge(*pmd)))
-                       continue;
-               if (pmd_none_or_clear_bad(pmd))
+               if (pmd_none_or_trans_huge_or_clear_bad(pmd))
                        continue;
                ret = unuse_pte_range(vma, pmd, addr, next, entry, page);
                if (ret)
This page took 0.02447 seconds and 5 git commands to generate.