From nobody Wed Nov 17 01:30:06 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7E313188AF64; Wed, 17 Nov 2021 01:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hv52k36cVz4ntk; Wed, 17 Nov 2021 01:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BFA41848A; Wed, 17 Nov 2021 01:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AH1U6XE042343; Wed, 17 Nov 2021 01:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH1U632042340; Wed, 17 Nov 2021 01:30:06 GMT (envelope-from git) Date: Wed, 17 Nov 2021 01:30:06 GMT Message-Id: <202111170130.1AH1U632042340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: aff57157db04 - stable/13 - nfscl: Fix forced dismount when "nconnect" is specified List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aff57157db04d67b2c8d2516021a17575a8c7041 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=aff57157db04d67b2c8d2516021a17575a8c7041 commit aff57157db04d67b2c8d2516021a17575a8c7041 Author: Rick Macklem AuthorDate: 2021-11-03 20:26:38 +0000 Commit: Rick Macklem CommitDate: 2021-11-17 01:27:06 +0000 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. (cherry picked from commit ae49051c033a2468af2f1f0079ecaf069b993245) --- sys/fs/nfs/nfs_commonkrpc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 2235f1077a03..358d77fe5b30 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -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) {