Date: Tue, 26 Oct 2021 02:14:40 GMT From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 23024f004a4c - main - nfscl: Add a missing delegation lock release Message-ID: <202110260214.19Q2EeYR013630@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=23024f004a4c5659bfcb0b08fac2211ae925ee58 commit 23024f004a4c5659bfcb0b08fac2211ae925ee58 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2021-10-26 02:09:14 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2021-10-26 02:11:45 +0000 nfscl: Add a missing delegation lock release There was a case in nfscl_doiods() where the function would return without releasing the delegation shared lock, if it was aquired by the call to nfscl_getstateid(). This patch adds that release. I have never observed a failure due to this missing release, so I do not know if it ever happens in practice. However, since the pNFS client is not yet heavily used, it might be the case. Found by code inspection during a recent NFSv4 IETF working group testing event. MFC after: 2 week --- sys/fs/nfsclient/nfs_clrpcops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 35ce9be88405..dec70dc2ac06 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -6045,6 +6045,8 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, if (layp == NULL || rflp == NULL) { if (recalled != 0) { NFSFREECRED(newcred); + if (lckp != NULL) + nfscl_lockderef(lckp); nfscl_relref(nmp); return (EIO); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110260214.19Q2EeYR013630>