Skip to content

Commit bf36c14

Browse files
jtlaytonchucklever
authored andcommitted
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>
1 parent f049911 commit bf36c14

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fs/nfsd/nfs4callback.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,12 @@ static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback
13631363
ret = true;
13641364
break;
13651365
case -ESERVERFAULT:
1366-
++session->se_cb_seq_nr[cb->cb_held_slot];
1366+
/*
1367+
* Call succeeded, but the session, slot index, or slot
1368+
* sequence number in the response do not match the same
1369+
* in the server's call. The sequence information is thus
1370+
* untrustworthy.
1371+
*/
13671372
nfsd4_mark_cb_fault(cb->cb_clp);
13681373
break;
13691374
case 1:

0 commit comments

Comments
 (0)