]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fs: Rename AS_THP_SUPPORT and mapping_thp_support
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 29 Aug 2021 10:28:19 +0000 (06:28 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 17 Nov 2021 15:36:35 +0000 (10:36 -0500)
These are now indicators of large folio support, not THP support.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
include/linux/pagemap.h

index 9e33878bf23b272b1e5e1a6767abd7e89b8487f6..60524645230514eaa4315a8d152dd102cc1177c7 100644 (file)
@@ -84,7 +84,7 @@ enum mapping_flags {
        AS_EXITING      = 4,    /* final truncate in progress */
        /* writeback related tags are not used */
        AS_NO_WRITEBACK_TAGS = 5,
-       AS_THP_SUPPORT = 6,     /* THPs supported */
+       AS_LARGE_FOLIO_SUPPORT = 6,
 };
 
 /**
@@ -189,12 +189,12 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask)
  */
 static inline void mapping_set_large_folios(struct address_space *mapping)
 {
-       __set_bit(AS_THP_SUPPORT, &mapping->flags);
+       __set_bit(AS_LARGE_FOLIO_SUPPORT, &mapping->flags);
 }
 
-static inline bool mapping_thp_support(struct address_space *mapping)
+static inline bool mapping_large_folio_support(struct address_space *mapping)
 {
-       return test_bit(AS_THP_SUPPORT, &mapping->flags);
+       return test_bit(AS_LARGE_FOLIO_SUPPORT, &mapping->flags);
 }
 
 static inline int filemap_nr_thps(struct address_space *mapping)
@@ -209,7 +209,7 @@ static inline int filemap_nr_thps(struct address_space *mapping)
 static inline void filemap_nr_thps_inc(struct address_space *mapping)
 {
 #ifdef CONFIG_READ_ONLY_THP_FOR_FS
-       if (!mapping_thp_support(mapping))
+       if (!mapping_large_folio_support(mapping))
                atomic_inc(&mapping->nr_thps);
 #else
        WARN_ON_ONCE(1);
@@ -219,7 +219,7 @@ static inline void filemap_nr_thps_inc(struct address_space *mapping)
 static inline void filemap_nr_thps_dec(struct address_space *mapping)
 {
 #ifdef CONFIG_READ_ONLY_THP_FOR_FS
-       if (!mapping_thp_support(mapping))
+       if (!mapping_large_folio_support(mapping))
                atomic_dec(&mapping->nr_thps);
 #else
        WARN_ON_ONCE(1);