Re: [PATCH] nfsd: don't modify a session slot when replaying its cached reply
From: Chuck Lever
Date: Tue Aug 25 2026 - 09:38:50 EST
On Mon, 24 Aug 2026 22:36:41 +0500, Ameer Hamza wrote:
> nfsd4_sequence() claims a session slot by setting NFSD4_SLOT_INUSE
> under nn->client_lock. A reply served from the slot's reply cache does
> not claim it, and that distinction lived only in cstate->status, which
> nfsd4_sequence() set to nfserr_replay_cache. Commit cc028a10a48c
> ("NFSD: Hoist status code encoding into XDR encoder functions") moved
> nfsd4_proc_compound()'s cstate->status assignment below the out:
> label, and the replay path's goto out was the one path that relied on
> skipping it. The test in nfsd4_sequence_done() therefore no longer
> identifies a replay, and every replay now stores its reply and clears
> NFSD4_SLOT_INUSE as though it owned the slot.
>
> [...]
Applied to nfsd-testing, thanks!
[1/1] nfsd: don't modify a session slot when replaying its cached reply
(no commit info)
--
Chuck Lever