From c313757fcea2e28fe59f3088b72f419059bfb111 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 20 Jul 2024 12:50:57 +0000 Subject: [PATCH] Revert "mm/hugetlb: add folio support to hugetlb specific flag macros" This reverts commit 3283a9894d58522256088c00348a89bfdc2458b6 which is commit d03c376d9066532551dc56837c7c5490e4fcbbfe upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I2df030f2b9346d0b70d9485c5f6c6ba90616c34c Signed-off-by: Greg Kroah-Hartman --- include/linux/hugetlb.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 0c5326fd3c47..1c6f35ba1604 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -625,50 +625,26 @@ enum hugetlb_page_flags { */ #ifdef CONFIG_HUGETLB_PAGE #define TESTHPAGEFLAG(uname, flname) \ -static __always_inline \ -bool folio_test_hugetlb_##flname(struct folio *folio) \ - { void *private = &folio->private; \ - return test_bit(HPG_##flname, private); \ - } \ static inline int HPage##uname(struct page *page) \ { return test_bit(HPG_##flname, &(page->private)); } #define SETHPAGEFLAG(uname, flname) \ -static __always_inline \ -void folio_set_hugetlb_##flname(struct folio *folio) \ - { void *private = &folio->private; \ - set_bit(HPG_##flname, private); \ - } \ static inline void SetHPage##uname(struct page *page) \ { set_bit(HPG_##flname, &(page->private)); } #define CLEARHPAGEFLAG(uname, flname) \ -static __always_inline \ -void folio_clear_hugetlb_##flname(struct folio *folio) \ - { void *private = &folio->private; \ - clear_bit(HPG_##flname, private); \ - } \ static inline void ClearHPage##uname(struct page *page) \ { clear_bit(HPG_##flname, &(page->private)); } #else #define TESTHPAGEFLAG(uname, flname) \ -static inline bool \ -folio_test_hugetlb_##flname(struct folio *folio) \ - { return 0; } \ static inline int HPage##uname(struct page *page) \ { return 0; } #define SETHPAGEFLAG(uname, flname) \ -static inline void \ -folio_set_hugetlb_##flname(struct folio *folio) \ - { } \ static inline void SetHPage##uname(struct page *page) \ { } #define CLEARHPAGEFLAG(uname, flname) \ -static inline void \ -folio_clear_hugetlb_##flname(struct folio *folio) \ - { } \ static inline void ClearHPage##uname(struct page *page) \ { } #endif