From: Nhat Pham <nphamcs@gmail.com>
To: Barry Song <21cnbao@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Barry Song <v-songbaohua@oppo.com>,
Yosry Ahmed <yosryahmed@google.com>,
Chengming Zhou <chengming.zhou@linux.dev>,
Chris Li <chrisl@kernel.org>,
David Hildenbrand <david@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH] mm: zswap: fix zswap_never_enabled() for CONFIG_ZSWAP==N
Date: Wed, 3 Jul 2024 16:22:30 -0700 [thread overview]
Message-ID: <CAKEwX=N8FTwR5h0ThOJG1-Uc+K_gxK6XGNeiWBSc+DZXhgATjw@mail.gmail.com> (raw)
In-Reply-To: <20240629232231.42394-1-21cnbao@gmail.com>
On Sat, Jun 29, 2024 at 4:22 PM Barry Song <21cnbao@gmail.com> wrote:
>
> From: Barry Song <v-songbaohua@oppo.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@oppo.com>
> Cc: Yosry Ahmed <yosryahmed@google.com>
> Cc: Nhat Pham <nphamcs@gmail.com>
> Cc: Chengming Zhou <chengming.zhou@linux.dev>
> Cc: Chris Li <chrisl@kernel.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Matthew Wilcox (Oracle) <willy@infradead.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@gmail.com>
prev parent reply other threads:[~2024-07-03 23:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-29 23:22 [PATCH] mm: zswap: fix zswap_never_enabled() for CONFIG_ZSWAP==N Barry Song
2024-07-01 2:54 ` Chengming Zhou
2024-07-01 13:32 ` Yosry Ahmed
2024-07-01 17:58 ` Chris Li
2024-07-02 6:52 ` Andrew Morton
2024-07-02 7:00 ` Barry Song
2024-07-02 11:58 ` Yosry Ahmed
2024-07-03 2:02 ` Andrew Morton
2024-07-02 6:58 ` David Hildenbrand
2024-07-03 23:22 ` Nhat Pham [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKEwX=N8FTwR5h0ThOJG1-Uc+K_gxK6XGNeiWBSc+DZXhgATjw@mail.gmail.com' \
--to=nphamcs@gmail.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=chrisl@kernel.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=v-songbaohua@oppo.com \
--cc=willy@infradead.org \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).