[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKEwX=N8FTwR5h0ThOJG1-Uc+K_gxK6XGNeiWBSc+DZXhgATjw@mail.gmail.com>
Date: Wed, 3 Jul 2024 16:22:30 -0700
From: Nhat Pham <nphamcs@...il.com>
To: Barry Song <21cnbao@...il.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Barry Song <v-songbaohua@...o.com>,
Yosry Ahmed <yosryahmed@...gle.com>, Chengming Zhou <chengming.zhou@...ux.dev>,
Chris Li <chrisl@...nel.org>, David Hildenbrand <david@...hat.com>,
Johannes Weiner <hannes@...xchg.org>, Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH] mm: zswap: fix zswap_never_enabled() for CONFIG_ZSWAP==N
On Sat, Jun 29, 2024 at 4:22 PM Barry Song <21cnbao@...il.com> wrote:
>
> From: Barry Song <v-songbaohua@...o.com>
>
> 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@...o.com>
> Cc: Yosry Ahmed <yosryahmed@...gle.com>
> Cc: Nhat Pham <nphamcs@...il.com>
> Cc: Chengming Zhou <chengming.zhou@...ux.dev>
> Cc: Chris Li <chrisl@...nel.org>
> Cc: David Hildenbrand <david@...hat.com>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: Matthew Wilcox (Oracle) <willy@...radead.org>
> ---
> 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@...il.com>
Powered by blists - more mailing lists