Re: [PATCH v4 10/19] mm/shmem_luo: Don't make early retrieve failures permanent
From: Pratyush Yadav
Date: Fri Nov 20 2026 - 07:03:04 EST
On Wed, Nov 11 2026, David Matlack wrote:
> Mark failures in shmem_luo_retrieve() before it starts restoring the
> folios as retryable. If no retrieve succeeds, finish() frees the
> preserved state, like it does for a file that was never retrieved.
>
> Until the folios are restored, nothing has consumed the preserved state.
> Leave it for another retrieve, which may succeed, e.g. if
> memfd_alloc_file() failed with -ENOMEM.
>
> The exception is a preserved file that this kernel can't restore, e.g.
> because it has seals that this kernel doesn't support. Retrying can't
> help, so keep that failure permanent, so that every later retrieve
> returns the same error.
>
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
> Acked-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Reviewed-by: Pratyush Yadav (Google) <pratyush@xxxxxxxxxx>
[...]
--
Regards,
Pratyush Yadav