There are no users of PageTransHuge(), remove it. Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> --- include/linux/page-flags.h | 13 ------------- include/linux/pgtable.h | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index b753d158762f..71e972ba489e 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -871,19 +871,6 @@ FOLIO_FLAG_FALSE(partially_mapped) #define PG_head_mask ((1UL << PG_head)) #ifdef CONFIG_TRANSPARENT_HUGEPAGE -/* - * PageHuge() only returns true for hugetlbfs pages, but not for - * normal or transparent huge pages. - * - * PageTransHuge() returns true for both transparent huge and - * hugetlbfs pages, but not normal pages. PageTransHuge() can only be - * called only in the core VM paths where hugetlbfs pages can't exist. - */ -static inline int PageTransHuge(const struct page *page) -{ - VM_BUG_ON_PAGE(PageTail(page), page); - return PageHead(page); -} /* * PageTransCompound returns true for both transparent huge pages diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 780f3b439d98..36fc336782e8 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -398,7 +398,7 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma, #else /* * Despite relevant to THP only, this API is called from generic rmap code - * under PageTransHuge(), hence needs a dummy implementation for !THP + * under THP, hence needs a dummy implementation for !THP */ static inline int pmdp_clear_flush_young(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp) -- 2.27.0