On Sat, Jun 29, 2024 at 4:22 PM Barry Song <21cnbao@xxxxxxxxx> wrote: > > From: Barry Song <v-songbaohua@xxxxxxxx> > > If CONFIG_ZSWAP is set to N, it means zswap cannot be enabled. > zswap_never_enabled() should return true. > > Fixes: 0300e17d67c3 ("mm: zswap: add zswap_never_enabled()") > Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx> > Cc: Yosry Ahmed <yosryahmed@xxxxxxxxxx> > Cc: Nhat Pham <nphamcs@xxxxxxxxx> > Cc: Chengming Zhou <chengming.zhou@xxxxxxxxx> > Cc: Chris Li <chrisl@xxxxxxxxxx> > Cc: David Hildenbrand <david@xxxxxxxxxx> > Cc: Johannes Weiner <hannes@xxxxxxxxxxx> > Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> > --- > include/linux/zswap.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/zswap.h b/include/linux/zswap.h > index bf83ae5e285d..6cecb4a4f68b 100644 > --- a/include/linux/zswap.h > +++ b/include/linux/zswap.h > @@ -68,7 +68,7 @@ static inline bool zswap_is_enabled(void) > > static inline bool zswap_never_enabled(void) > { > - return false; > + return true; > } > > #endif > -- > 2.34.1 > That's some pretty yikesy bug :) Thankfully this seems unused thus far (which is probably why it is not caught until now). Thanks for fixing this, Barry! Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>