Re: [PATCH 01/16] mm: zswap: return -ENOENT when the swap device is gone
From: Baoquan He
Date: Thu Sep 03 2026 - 04:14:56 EST
On 09/02/26 at 10:53am, Nhat Pham wrote:
> 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?
Right, this should be sent out as a standalone patch. I will split it
from v2. Thanks for careful checking.
>
> Acked-by: Nhat Pham <nphamcs@xxxxxxxxx>