[PATCH v3 06/10] mm/shmem_luo: Don't make early retrieve failures permanent

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 3 17:03:29 PST 2026


> Mark failures in shmem_luo_retrieve() before it starts restoring the
> folios as retryable, and return the error without freeing the serialized
> state. If no retrieve succeeds, finish() frees the preserved folios,
> like it does for a file that was never retrieved.
> 
> Nothing has consumed the preserved state before the folios are
> restored, so the retrieve can be tried again.
> 
> This also fixes leaking the preserved folios when one of these early
> steps fails, e.g. because the file has seals that this kernel doesn't
> support. The retrieve freed the serialized state but not the folios, and
> finish() then skipped the file because its retrieve had failed. There is
> no Fixes tag, since the fix relies on args->retryable, which was only
> added earlier in this series.
> 
> Signed-off-by: David Matlack <dmatlack at google.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103010216.3447716-1-dmatlack@google.com?part=6




More information about the kexec mailing list