aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorMateusz Guzik <[email protected]>2020-11-12 17:33:14 -0500
committerBrian Behlendorf <[email protected]>2021-03-12 15:51:20 -0800
commitf9acd578f0d62639c4e0b4b44bd4a72fa1cd311a (patch)
treefed4b205613d2942ba28f63fc3d0767fd229e698 /module
parent300f68e017e80366f406a816e6070521d1215e82 (diff)
FreeBSD: remove 2 assertions that teardown lock is not held
They are not very useful and hard to implement in the rms routine the code is about to start using. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matt Macy <[email protected]> Signed-off-by: Mateusz Guzik <[email protected]> Closes #11153
Diffstat (limited to 'module')
-rw-r--r--module/os/freebsd/zfs/zfs_vnops_os.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c
index 86b6b20e1..5471976c8 100644
--- a/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -701,10 +701,6 @@ zfs_lookup_lock(vnode_t *dvp, vnode_t *vp, const char *name, int lkflags)
if (zfsvfs->z_replay == B_FALSE)
ASSERT_VOP_LOCKED(dvp, __func__);
-#ifdef DIAGNOSTIC
- if ((zdp->z_pflags & ZFS_XATTR) == 0)
- VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock));
-#endif
if (name[0] == 0 || (name[0] == '.' && name[1] == 0)) {
ASSERT3P(dvp, ==, vp);
@@ -5734,39 +5730,6 @@ zfs_vptocnp(struct vop_vptocnp_args *ap)
return (error);
}
-#ifdef DIAGNOSTIC
-#ifndef _SYS_SYSPROTO_H_
-struct vop_lock1_args {
- struct vnode *a_vp;
- int a_flags;
- char *file;
- int line;
-};
-#endif
-
-static int
-zfs_lock(struct vop_lock1_args *ap)
-{
- vnode_t *vp;
- znode_t *zp;
- int err;
-
-#if __FreeBSD_version >= 1300064
- err = vop_lock(ap);
-#else
- err = vop_stdlock(ap);
-#endif
- if (err == 0 && (ap->a_flags & LK_NOWAIT) == 0) {
- vp = ap->a_vp;
- zp = vp->v_data;
- if (vp->v_mount != NULL && !VN_IS_DOOMED(vp) &&
- zp != NULL && (zp->z_pflags & ZFS_XATTR) == 0)
- VERIFY(!RRM_LOCK_HELD(&zp->z_zfsvfs->z_teardown_lock));
- }
- return (err);
-}
-#endif
-
struct vop_vector zfs_vnodeops;
struct vop_vector zfs_fifoops;
struct vop_vector zfs_shareops;
@@ -5817,17 +5780,9 @@ struct vop_vector zfs_vnodeops = {
.vop_putpages = zfs_freebsd_putpages,
.vop_vptocnp = zfs_vptocnp,
#if __FreeBSD_version >= 1300064
-#ifdef DIAGNOSTIC
- .vop_lock1 = zfs_lock,
-#else
.vop_lock1 = vop_lock,
-#endif
.vop_unlock = vop_unlock,
.vop_islocked = vop_islocked,
-#else
-#ifdef DIAGNOSTIC
- .vop_lock1 = zfs_lock,
-#endif
#endif
};
VFS_VOP_VECTOR_REGISTER(zfs_vnodeops);