From 8773e29c2362701f12293d72a7c4dcb1e9368e15 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Mon, 12 Oct 2020 21:27:59 +0000 Subject: [PATCH] FreeBSD: rework asserts in zfs_dd_lookup 1. even up ifdefs 2. drop the arguably useless teardown lock asserts -- nothing else checks for it Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Reviewed-by: Matt Macy Signed-off-by: Mateusz Guzik Closes #11153 --- module/os/freebsd/zfs/zfs_dir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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));