nfsd: when CB_SEQUENCE gets ESERVERFAULT don't increment seq_nr

ESERVERFAULT means that the server sent a successful and legitimate
reply, but the session info didn't match what was expected. Don't
increment the seq_nr in that case.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
Jeff Layton
2025-02-09 07:31:26 -05:00
committed by Chuck Lever
parent f049911b5b
commit bf36c14972

View File

@@ -1363,7 +1363,12 @@ static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback
ret = true;
break;
case -ESERVERFAULT:
++session->se_cb_seq_nr[cb->cb_held_slot];
/*
* Call succeeded, but the session, slot index, or slot
* sequence number in the response do not match the same
* in the server's call. The sequence information is thus
* untrustworthy.
*/
nfsd4_mark_cb_fault(cb->cb_clp);
break;
case 1: