diff options
author | Mateusz Guzik <[email protected]> | 2020-11-12 17:33:14 -0500 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2021-06-23 13:22:14 -0700 |
commit | 140584bfff37eea29cad59fa0981382eb428d454 (patch) | |
tree | 6e97ed9ff618498b3cac51456a80acb84a4cbc24 /module | |
parent | 8773e29c2362701f12293d72a7c4dcb1e9368e15 (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.c | 45 |
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 4b07a8a14..34662cfd5 100644 --- a/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/module/os/freebsd/zfs/zfs_vnops_os.c @@ -933,10 +933,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); @@ -5957,39 +5953,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; @@ -6040,17 +6003,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); |