On 11 Jun 16:47, Miaohe Lin wrote: > If we reach here, hugepage_vma_check() has already made sure that hugepage > is enabled for shmem. Remove this duplicated check. > > Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx> > --- > mm/khugepaged.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/mm/khugepaged.c b/mm/khugepaged.c > index 476d79360101..73570dfffcec 100644 > --- a/mm/khugepaged.c > +++ b/mm/khugepaged.c > @@ -2153,8 +2153,6 @@ static unsigned int khugepaged_scan_mm_slot(unsigned int pages, > if (khugepaged_scan.address < hstart) > khugepaged_scan.address = hstart; > VM_BUG_ON(khugepaged_scan.address & ~HPAGE_PMD_MASK); > - if (shmem_file(vma->vm_file) && !shmem_huge_enabled(vma)) > - goto skip; > > while (khugepaged_scan.address < hend) { > int ret; > -- > 2.23.0 > > Thanks for these cleanups, Miaohe. Reviewed-by: Zach O'Keefe <zokeefe@xxxxxxxxxx>