nfscl: Fix forced dismount when "nconnect" is specified

When a forced dismount is done and the "nconnect" mount
option was used, the additional connections must be closed.
This patch does that.

Found during a recent IETF NFSv4 working group testing event.

MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2021-11-03 13:26:38 -07:00
parent 3ea9a7cf7b
commit ae49051c03

View File

@ -1298,9 +1298,13 @@ newnfs_nmcancelreqs(struct nfsmount *nmp)
{
struct nfsclds *dsp;
struct __rpc_client *cl;
int i;
if (nmp->nm_sockreq.nr_client != NULL)
CLNT_CLOSE(nmp->nm_sockreq.nr_client);
for (i = 0; i < nmp->nm_aconnect; i++)
if (nmp->nm_aconn[i] != NULL)
CLNT_CLOSE(nmp->nm_aconn[i]);
lookformore:
NFSLOCKMNT(nmp);
TAILQ_FOREACH(dsp, &nmp->nm_sess, nfsclds_list) {