aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pagemap.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2020-10-10 11:47:55 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 13:01:36 -0400
commit06d44142d49dc2e02d255ea9d72dc4c20f20388f (patch)
treeaaaeb9a75bb626b3eefbd9955a2727cfeb149fad /include/linux/pagemap.h
parentmm/filemap: Allow large folios to be added to the page cache (diff)
downloadlinux-dev-06d44142d49dc2e02d255ea9d72dc4c20f20388f.tar.xz
linux-dev-06d44142d49dc2e02d255ea9d72dc4c20f20388f.zip
mm: Fix READ_ONLY_THP warning
These counters only exist if CONFIG_READ_ONLY_THP_FOR_FS is defined, but we do not need to warn if the filesystem natively supports large folios. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'include/linux/pagemap.h')
-rw-r--r--include/linux/pagemap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index a73c928e1d74..0a2417fc531c 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -326,7 +326,7 @@ static inline void filemap_nr_thps_inc(struct address_space *mapping)
if (!mapping_large_folio_support(mapping))
atomic_inc(&mapping->nr_thps);
#else
- WARN_ON_ONCE(1);
+ WARN_ON_ONCE(mapping_large_folio_support(mapping) == 0);
#endif
}
@@ -336,7 +336,7 @@ static inline void filemap_nr_thps_dec(struct address_space *mapping)
if (!mapping_large_folio_support(mapping))
atomic_dec(&mapping->nr_thps);
#else
- WARN_ON_ONCE(1);
+ WARN_ON_ONCE(mapping_large_folio_support(mapping) == 0);
#endif
}