From 2c8e3e4b28a40e6a1b1926ce03da1a725f0e60f8 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Tue, 20 Sep 2022 02:17:27 +0200 Subject: [PATCH] FreeBSD: stop passing LK_INTERLOCK to VOP_LOCK There is an ongoing effort to eliminate this feature. Reviewed-by: Alexander Motin Reviewed-by: Ryan Moeller Signed-off-by: Mateusz Guzik Closes #13908 --- module/os/freebsd/zfs/zfs_ctldir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/os/freebsd/zfs/zfs_ctldir.c b/module/os/freebsd/zfs/zfs_ctldir.c index 3a5c9f8caf0a..5bd2e1510ddb 100644 --- a/module/os/freebsd/zfs/zfs_ctldir.c +++ b/module/os/freebsd/zfs/zfs_ctldir.c @@ -976,12 +976,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 {