diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c index db1a5d71df..658b556095 100644 --- a/module/zfs/dnode.c +++ b/module/zfs/dnode.c @@ -1621,7 +1621,9 @@ dnode_rele_and_unlock(dnode_t *dn, void *tag, boolean_t evicting) * other direct or indirect hold on the dnode must first drop the dnode * handle. */ +#ifdef ZFS_DEBUG ASSERT(refs > 0 || dnh->dnh_zrlock.zr_owner != curthread); +#endif /* NOTE: the DNODE_DNODE does not have a dn_dbuf */ if (refs == 0 && db != NULL) {