@@ -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
@@ -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)
There are no users of PageTransHuge(), remove it. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- include/linux/page-flags.h | 13 ------------- include/linux/pgtable.h | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-)