Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Sep 2022 20:05:26 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 4e1262ac9927 - main - zfs: stop passing LK_INTERLOCK to VOP_LOCK
Message-ID:  <202209192005.28JK5Q0m074600@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=4e1262ac99272db5c65f924acf9686876742c2cd

commit 4e1262ac99272db5c65f924acf9686876742c2cd
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-09-19 20:03:01 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-09-19 20:03:01 +0000

    zfs: stop passing LK_INTERLOCK to VOP_LOCK
    
    There is an ongoing effort to eliminate this feature.
---
 sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c
index 2c35b74cd3fd..82f0ef335d38 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c
@@ -977,12 +977,13 @@ zfsctl_snapdir_lookup(struct vop_lookup_args *ap)
 		 */
 		VI_LOCK(*vpp);
 		if (((*vpp)->v_iflag & VI_MOUNT) == 0) {
+			VI_UNLOCK(*vpp);
 			/*
 			 * Upgrade to exclusive lock in order to:
 			 * - avoid race conditions
 			 * - satisfy the contract of mount_snapshot()
 			 */
-			err = VOP_LOCK(*vpp, LK_TRYUPGRADE | LK_INTERLOCK);
+			err = VOP_LOCK(*vpp, LK_TRYUPGRADE);
 			if (err == 0)
 				break;
 		} else {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209192005.28JK5Q0m074600>