mm: Export PageHeadHuge()
Subsystems (2)
PATCH 1/1 mm: Export PageHeadHuge()
Export PageHeadHuge() - it's used by folio_test_hugetlb() and thence by such as folio_file_page() and folio_contains(). Matthew suggested I use the first of those instead of doing the same calculation manually - but I can't call it from a module.
Kirill suggested rearranging things to put it in a header, but that introduces header dependencies because of where constants are defined.
--- mm/hugetlb.c | 1 + 1 file changed, 1 insertion(+)
mm/hugetlb.c +1 -0
@@ -1854,6 +1854,7 @@ int PageHeadHuge(struct page *page_head)return page_head[1 ].compound_dtor ==HUGETLB_PAGE_DTOR ; } +EXPORT_SYMBOL (PageHeadHuge);/* * Find and lock address space (mapping) in write mode.
Quoted 22 lines · David Howells
Export
PageHeadHuge()- it's used byfolio_test_hugetlb()and thence by such asfolio_file_page()andfolio_contains(). Matthew suggested I use the first of those instead of doing the same calculation manually - but I can't call it from a module.Kirill suggested rearranging things to put it in a header, but that introduces header dependencies because of where constants are defined.
Signed-off-by David Howells <[email protected]>--- mm/hugetlb.c | 1 + 1 file changed, 1 insertion(+)mm/hugetlb.c +0
-0
mm/hugetlb.c int PageHeadHuge(struct page *page_head) · line 1857
Quoted 4 lines
mm/hugetlb.c +1
-0@@ -1854,6 +1854,7 @@ int PageHeadHuge(struct page *page_head)return page_head[1 ].compound_dtor ==HUGETLB_PAGE_DTOR ; } +EXPORT_SYMBOL (PageHeadHuge);
EXPORT_SYMBOL_GPL for anything hugepage related, please.