mm/hugetlb: remove {Set,Clear}Hpage macros
authorSidhartha Kumar <sidhartha.kumar@oracle.com>
Mon, 20 May 2024 22:44:07 +0000 (15:44 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 4 Jul 2024 02:29:56 +0000 (19:29 -0700)
All users have been converted to use the folio version of these macros, we
can safely remove the page based interface.

Link: https://lkml.kernel.org/r/20240520224407.110062-1-sidhartha.kumar@oracle.com
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/hugetlb.h

index 2b3c3a4..15a58f6 100644 (file)
@@ -625,18 +625,14 @@ 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                                             \
@@ -648,15 +644,11 @@ static inline int HPage##uname(struct page *page)         \
 #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