Re: [PATCH 01/16] mm: zswap: return -ENOENT when the swap device is gone

From: Nhat Pham

Date: Wed Sep 02 2026 - 12:53:22 EST


On Thu, Aug 27, 2026 at 5:45 AM Baoquan He <hebaoquan@xxxxxxxxxx> wrote:
>
> zswap_writeback_entry() returns -EEXIST when get_swap_device() finds no
> device. -EEXIST is the shrinker's "page already in swap cache" signal,
> which makes zswap_shrinker_scan() stop shrinking entirely. A NULL
> get_swap_device() instead means the device is being swapped off, so the
> entry is simply stale.
>
> Return -ENOENT so the shrinker skips the stale entry and keeps scanning.
> Independent of xswap; affects all swap devices.
>
> Signed-off-by: Baoquan He <hebaoquan@xxxxxxxxxx>

I think this should be submitted independently of this patch series!
It's a small, self-contained fix for an existing issue, no?

Acked-by: Nhat Pham <nphamcs@xxxxxxxxx>