diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-06-17 18:50:17 +0100 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-07-03 18:08:48 -0700 |
commit | 5375336c8c42a343c3b440b6f1e21c65e7b174b9 (patch) | |
tree | a79598f7b903615471e753aa716006b3b2fb6f38 /mm/page_alloc.c | |
parent | 188e8caee968def9fb67c7536c270b5b463c3461 (diff) | |
download | lwn-5375336c8c42a343c3b440b6f1e21c65e7b174b9.tar.gz lwn-5375336c8c42a343c3b440b6f1e21c65e7b174b9.zip |
mm: convert destroy_compound_page() to destroy_large_folio()
All callers now have a folio, so push the folio->page conversion
down to this function.
[akpm@linux-foundation.org: uninline destroy_large_folio() to fix build issue]
Link: https://lkml.kernel.org/r/20220617175020.717127-20-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 248469134962..52fd92b2c1fe 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -744,6 +744,14 @@ void prep_compound_page(struct page *page, unsigned int order) prep_compound_head(page, order); } +void destroy_large_folio(struct folio *folio) +{ + enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor; + + VM_BUG_ON_FOLIO(dtor >= NR_COMPOUND_DTORS, folio); + compound_page_dtors[dtor](&folio->page); +} + #ifdef CONFIG_DEBUG_PAGEALLOC unsigned int _debug_guardpage_minorder; |