From: Ralph Campbell Date: Fri, 26 Jul 2019 00:56:49 +0000 (-0700) Subject: mm/hmm: remove hugetlbfs check in hmm_vma_walk_pmd X-Git-Tag: v5.4-rc1~92^2~49 X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=f527688d5d8a80d2d1b2c02779105747c2f4f705;p=linux%2F.git mm/hmm: remove hugetlbfs check in hmm_vma_walk_pmd walk_page_range() will only call hmm_vma_walk_hugetlb_entry() for hugetlbfs pages and doesn't call hmm_vma_walk_pmd() in this case. Therefore, it is safe to remove the check for vma->vm_flags & VM_HUGETLB in hmm_vma_walk_pmd(). Link: https://lore.kernel.org/r/20190726005650.2566-7-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe --- diff --git a/mm/hmm.c b/mm/hmm.c index 1bc014cddd78..6111c0a3c12d 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -630,9 +630,6 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp, if (pmd_none(pmd)) return hmm_vma_walk_hole(start, end, walk); - if (pmd_huge(pmd) && (range->vma->vm_flags & VM_HUGETLB)) - return hmm_pfns_bad(start, end, walk); - if (thp_migration_supported() && is_pmd_migration_entry(pmd)) { bool fault, write_fault; unsigned long npages;