diff --git a/module/os/freebsd/zfs/zfs_dir.c b/module/os/freebsd/zfs/zfs_dir.c index 4b1f4a883..de145a677 100644 --- a/module/os/freebsd/zfs/zfs_dir.c +++ b/module/os/freebsd/zfs/zfs_dir.c @@ -206,10 +206,10 @@ zfs_dd_lookup(znode_t *dzp, znode_t **zpp) uint64_t parent; int error; +#ifdef ZFS_DEBUG if (zfsvfs->z_replay == B_FALSE) ASSERT_VOP_LOCKED(ZTOV(dzp), __func__); - ASSERT(RRM_READ_HELD(&zfsvfs->z_teardown_lock)); - +#endif if (dzp->z_unlinked) return (ENOENT); @@ -233,7 +233,6 @@ zfs_dirlook(znode_t *dzp, const char *name, znode_t **zpp) #ifdef ZFS_DEBUG if (zfsvfs->z_replay == B_FALSE) ASSERT_VOP_LOCKED(ZTOV(dzp), __func__); - ASSERT(RRM_READ_HELD(&zfsvfs->z_teardown_lock)); #endif if (dzp->z_unlinked) return (SET_ERROR(ENOENT));