* [merged mm-stable] hugetlb-remove-pageheadhuge.patch removed from -mm tree
@ 2023-04-18 23:33 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-04-18 23:33 UTC (permalink / raw)
To: mm-commits, songmuchun, sidhartha.kumar, mike.kravetz, david,
willy, akpm
The quilt patch titled
Subject: hugetlb: remove PageHeadHuge()
has been removed from the -mm tree. Its filename was
hugetlb-remove-pageheadhuge.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: hugetlb: remove PageHeadHuge()
Date: Mon, 27 Mar 2023 16:10:50 +0100
Sidhartha Kumar removed the last caller of PageHeadHuge(), so we can now
remove it and make folio_test_hugetlb() the real implementation. Add
kernel-doc for folio_test_hugetlb().
Link: https://lkml.kernel.org/r/20230327151050.1787744-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/page-flags.h | 7 +------
mm/hugetlb.c | 18 +++++++++++-------
2 files changed, 12 insertions(+), 13 deletions(-)
--- a/include/linux/page-flags.h~hugetlb-remove-pageheadhuge
+++ a/include/linux/page-flags.h
@@ -815,14 +815,9 @@ static inline void ClearPageCompound(str
#ifdef CONFIG_HUGETLB_PAGE
int PageHuge(struct page *page);
-int PageHeadHuge(struct page *page);
-static inline bool folio_test_hugetlb(struct folio *folio)
-{
- return PageHeadHuge(&folio->page);
-}
+bool folio_test_hugetlb(struct folio *folio);
#else
TESTPAGEFLAG_FALSE(Huge, hugetlb)
-TESTPAGEFLAG_FALSE(HeadHuge, headhuge)
#endif
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
--- a/mm/hugetlb.c~hugetlb-remove-pageheadhuge
+++ a/mm/hugetlb.c
@@ -2050,19 +2050,23 @@ int PageHuge(struct page *page)
}
EXPORT_SYMBOL_GPL(PageHuge);
-/*
- * PageHeadHuge() only returns true for hugetlbfs head page, but not for
- * normal or transparent huge pages.
+/**
+ * folio_test_hugetlb - Determine if the folio belongs to hugetlbfs
+ * @folio: The folio to test.
+ *
+ * Context: Any context. Caller should have a reference on the folio to
+ * prevent it from being turned into a tail page.
+ * Return: True for hugetlbfs folios, false for anon folios or folios
+ * belonging to other filesystems.
*/
-int PageHeadHuge(struct page *page_head)
+bool folio_test_hugetlb(struct folio *folio)
{
- struct folio *folio = (struct folio *)page_head;
if (!folio_test_large(folio))
- return 0;
+ return false;
return folio->_folio_dtor == HUGETLB_PAGE_DTOR;
}
-EXPORT_SYMBOL_GPL(PageHeadHuge);
+EXPORT_SYMBOL_GPL(folio_test_hugetlb);
/*
* Find and lock address space (mapping) in write mode.
_
Patches currently in -mm which might be from willy@infradead.org are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-18 23:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-18 23:33 [merged mm-stable] hugetlb-remove-pageheadhuge.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.