From: Andrew Morton <akpm@linux-foundation.org>
Date: Tue, 21 Jun 2022 22:24:15 +0000 (-0700)
Subject: mm-convert-destroy_compound_page-to-destroy_large_folio-fix
X-Git-Tag: maple_v12_fixes~61
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3c301e6d5a93a7d22b3ab7163e313cfe956621d7;p=users%2Fjedix%2Flinux-maple.git

mm-convert-destroy_compound_page-to-destroy_large_folio-fix

uninline destroy_large_folio() to fix build issue

Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

diff --git a/include/linux/mm.h b/include/linux/mm.h
index f6699b11522a..3e1dee34e4fd 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -924,13 +924,7 @@ static inline void set_compound_page_dtor(struct page *page,
 	page[1].compound_dtor = compound_dtor;
 }
 
-static inline 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);
-}
+void destroy_large_folio(struct folio *folio);
 
 static inline int head_compound_pincount(struct page *head)
 {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e3c2f3223fc4..d7c72f43f1da 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;