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

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Oct 23 15:51:35 PDT 2026


> If shmem_luo_retrieve() fails before it starts restoring the folios,
> mark the failure as retryable and return the error without freeing the
> serialized state. Nothing has consumed the preserved state at that
> point, so the retrieve can be tried again. If no retrieve succeeds,
> finish() frees the preserved folios, like it does for a file that was
> never retrieved.
> 
> This 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.
> 
> Assisted-by: LLM
> 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/20261022225035.377445-1-dmatlack@google.com?part=6




More information about the kexec mailing list