From: Christoph Hellwig <hch@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
willy@infradead.org, kirill@shutemov.name, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Export PageHeadHuge()
Date: Mon, 28 Feb 2022 05:41:10 -0800 [thread overview]
Message-ID: <YhzQ9izSfN7JQ9Go@infradead.org> (raw)
In-Reply-To: <2494562.1646054576@warthog.procyon.org.uk>
On Mon, Feb 28, 2022 at 01:22:56PM +0000, David Howells wrote:
>
> 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.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: willy@infradead.org
> Link: https://lore.kernel.org/r/163707085314.3221130.14783857863702203440.stgit@warthog.procyon.org.uk/
>
> ---
> mm/hugetlb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 61895cc01d09..5768df43b05c 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -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.
next prev parent reply other threads:[~2022-02-28 13:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 13:22 [PATCH] mm: Export PageHeadHuge() David Howells
2022-02-28 13:41 ` Christoph Hellwig [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-16 13:54 David Howells
2021-11-17 8:36 ` Kirill A. Shutemov
2021-11-17 13:20 ` Matthew Wilcox
2021-11-17 14:01 ` Kirill A. Shutemov
2021-08-20 16:14 David Howells
2021-08-20 17:35 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YhzQ9izSfN7JQ9Go@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).