nfscl: Fix setup of Sequence when all slots marked bad

Commit 40ada74ee1 modified the NFSv4.1/4.2 client so
that it would issue a DestroySession to the server when
all session slots are marked bad.  Once this is done,
the Sequence operation should get a NFSERR_BADSESSION
reply from the server.

Without this patch, the code was setting ND_HASSLOTID
when, in fact, there was no slot marked in use by
nfsv4_sequencelookup().  This would result in the
code freeing a slot not in use.  The effect of this
was minimal, since the session was already destroyed.

This patch fixes the code so that it does not set
ND_HASSLOTID for this case.

MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2022-08-28 14:36:45 -07:00
parent 0685c73cfe
commit 117cea02a4

View File

@ -4787,7 +4787,6 @@ nfsv4_setsequence(struct nfsmount *nmp, struct nfsrv_descript *nd,
if (error == NFSERR_SEQMISORDERED) {
/* If all slots are bad, Destroy the session. */
nfsrpc_destroysession(nmp, sep, cred, curthread);
error = 0;
}
} else
error = nfsv4_sequencelookup(nmp, sep, &slotpos, &maxslot,