summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-04-05 17:32:25 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-04-26 05:56:44 +0200
commit2542b1ac9a46ac58f9565de0048457956898d481 (patch)
tree3704ea4b8529db5a7ce998c622605786f306ae29 /mm/page_alloc.c
parentmm: combine free_the_page() and free_unref_page() (diff)
downloadlinux-2542b1ac9a46ac58f9565de0048457956898d481.tar.xz
linux-2542b1ac9a46ac58f9565de0048457956898d481.zip
mm: inline destroy_large_folio() into __folio_put_large()
destroy_large_folio() has only one caller, move its contents there. Link: https://lkml.kernel.org/r/20240405153228.2563754-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c01757251de2..22e8b9f1d710 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -565,20 +565,6 @@ void prep_compound_page(struct page *page, unsigned int order)
prep_compound_head(page, order);
}
-void destroy_large_folio(struct folio *folio)
-{
- if (folio_test_hugetlb(folio)) {
- free_huge_folio(folio);
- return;
- }
-
- if (folio_test_large_rmappable(folio))
- folio_undo_large_rmappable(folio);
-
- mem_cgroup_uncharge(folio);
- free_unref_page(&folio->page, folio_order(folio));
-}
-
static inline void set_buddy_order(struct page *page, unsigned int order)
{
set_page_private(page, order);