linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nhat Pham <nphamcs@gmail.com>
To: "Kanchana P. Sridhar" <kanchanapsridhar2026@gmail.com>
Cc: hannes@cmpxchg.org, yosry@kernel.org, chengming.zhou@linux.dev,
	 akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,  herbert@gondor.apana.org.au,
	senozhatsky@chromium.org
Subject: Re: [PATCH v3 1/2] mm: zswap: Remove redundant checks in zswap_cpu_comp_dead().
Date: Sun, 12 Apr 2026 17:34:08 -0700	[thread overview]
Message-ID: <CAKEwX=PZC9_k0QewD1abEyTQRn9Kn7pM8VAR5bgreEN5jVmvyA@mail.gmail.com> (raw)
In-Reply-To: <20260331183351.29844-2-kanchanapsridhar2026@gmail.com>

On Tue, Mar 31, 2026 at 11:34 AM Kanchana P. Sridhar
<kanchanapsridhar2026@gmail.com> wrote:
>
> There are presently redundant checks on the per-CPU acomp_ctx and it's
> "req" member in zswap_cpu_comp_dead(): redundant because they are
> inconsistent with zswap_pool_create() handling of failure in allocating
> the acomp_ctx, and with the expected NULL return value from the
> acomp_request_alloc() API when it fails to allocate an acomp_req.
>
> Fix these by converting to them to be NULL checks.
>
> Add comments in zswap_cpu_comp_prepare() clarifying the expected return
> values of the crypto_alloc_acomp_node() and acomp_request_alloc() API.
>
> Suggested-by: Yosry Ahmed <yosry@kernel.org>
> Signed-off-by: Kanchana P. Sridhar <kanchanapsridhar2026@gmail.com>
> Acked-by: Yosry Ahmed <yosry@kernel.org>
> ---

Acked-by: Nhat Pham <nphamcs@gmail.com>


  reply	other threads:[~2026-04-13  0:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 18:33 [PATCH v3 0/2] zswap pool per-CPU acomp_ctx simplifications Kanchana P. Sridhar
2026-03-31 18:33 ` [PATCH v3 1/2] mm: zswap: Remove redundant checks in zswap_cpu_comp_dead() Kanchana P. Sridhar
2026-04-13  0:34   ` Nhat Pham [this message]
2026-03-31 18:33 ` [PATCH v3 2/2] mm: zswap: Tie per-CPU acomp_ctx lifetime to the pool Kanchana P. Sridhar
2026-04-13  0:42   ` Nhat Pham
2026-03-31 19:22 ` [PATCH v3 0/2] zswap pool per-CPU acomp_ctx simplifications Yosry Ahmed
2026-03-31 20:58   ` Kanchana P. Sridhar
2026-03-31 22:19     ` Andrew Morton
2026-03-31 22:38       ` Kanchana P. Sridhar

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=PZC9_k0QewD1abEyTQRn9Kn7pM8VAR5bgreEN5jVmvyA@mail.gmail.com' \
    --to=nphamcs@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=hannes@cmpxchg.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kanchanapsridhar2026@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=senozhatsky@chromium.org \
    --cc=yosry@kernel.org \
    /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