[PATCH v2 14/26] mm: Allow can_split_folio() to be called when THP are disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The call to can_split_folio() in vmscan is currently guarded by a test
of PageTransHuge() so the BUILD_BUG() is eliminated if THP are disabled.
The next patch replaces that test with folio_test_large() which may
be true, even when THP are disabled.  However, if THP are disabled,
we cannot split, so an unconditional return of false is appropriate.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
 include/linux/huge_mm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 2999190adc22..e9e0d591061d 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -347,7 +347,6 @@ static inline void prep_transhuge_page(struct page *page) {}
 static inline bool
 can_split_folio(struct folio *folio, int *pextra_pins)
 {
-	BUILD_BUG();
 	return false;
 }
 static inline int
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux