Skip to content

Commit 5fb2516

Browse files
neilbrownchucklever
authored andcommitted
nfsd: fix uninitialised slot info when a request is retried
A recent patch moved the assignment of seq->maxslots from before the test for a resent request (which ends with a goto) to after, resulting in it not being run in that case. This results in the server returning bogus "high slot id" and "target high slot id" values. The assignments to ->maxslots and ->target_maxslots need to be *after* the out: label so that the correct values are returned in replies to requests that are served from cache. Fixes: 60aa656 ("nfsd: allocate new session-based DRC slots on demand.") Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent b9382e2 commit 5fb2516

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/nfsd/nfs4state.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4459,10 +4459,11 @@ nfsd4_sequence(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44594459
}
44604460
} while (slot && --cnt > 0);
44614461
}
4462+
4463+
out:
44624464
seq->maxslots = max(session->se_target_maxslots, seq->maxslots);
44634465
seq->target_maxslots = session->se_target_maxslots;
44644466

4465-
out:
44664467
switch (clp->cl_cb_state) {
44674468
case NFSD4_CB_DOWN:
44684469
seq->status_flags = SEQ4_STATUS_CB_PATH_DOWN;

0 commit comments

Comments
 (0)