From: David Howells Date: Tue, 22 Mar 2022 21:45:26 +0000 (-0700) Subject: mm/hugetlb.c: export PageHeadHuge() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4e936ecc013adde12649d572352d6f37655c39b7;p=linux.git mm/hugetlb.c: 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. [akpm@linux-foundation.org: s/EXPORT_SYMBOL/EXPORT_SYMBOL_GPL/, per Christoph] Link: https://lkml.kernel.org/r/2494562.1646054576@warthog.procyon.org.uk Link: https://lore.kernel.org/r/163707085314.3221130.14783857863702203440.stgit@warthog.procyon.org.uk/ Signed-off-by: David Howells Cc: Matthew Wilcox (Oracle) Cc: Kirill A. Shutemov Cc: Christoph Hellwig Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 369ff0791bdde..f425147e4ce3a 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1855,6 +1855,7 @@ int PageHeadHuge(struct page *page_head) return page_head[1].compound_dtor == HUGETLB_PAGE_DTOR; } +EXPORT_SYMBOL_GPL(PageHeadHuge); /* * Find and lock address space (mapping) in write mode.