On Tue, Jul 09, 2024 at 04:29:07PM +0000, Pankaj Raghav (Samsung) wrote: > +++ b/include/linux/pagemap.h > @@ -394,13 +394,24 @@ static inline void mapping_set_folio_order_range(struct address_space *mapping, > unsigned int min, > unsigned int max) > { > - if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) > + if (!IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { > + VM_WARN_ONCE(1, > + "THP needs to be enabled to support mapping folio order range"); > return; > + } No. Filesystems call mapping_set_folio_order_range() without it being conditional on CONFIG_TRANSPARENT_HUGEPAGE. Usually that takes the form of an unconditional call to mapping_set_large_folios().