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 <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Macy <mmacy@FreeBSD.org> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Closes #11153
This commit is contained in:
parent
bb21c0aa3b
commit
8773e29c23
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue