summaryrefslogtreecommitdiffstats
path: root/module/zfs/dnode_sync.c
diff options
context:
space:
mode:
authorMadhav Suresh <[email protected]>2013-05-10 14:17:03 -0700
committerBrian Behlendorf <[email protected]>2013-06-19 15:14:10 -0700
commitc99c90015ece64746e20b74245caca41d1dbefe1 (patch)
treecc4e993d3796f076a2dd1de43b4a2bd38ba10cc8 /module/zfs/dnode_sync.c
parent9eaf0832ad945fb8584c39fb9aeb5e8578912aeb (diff)
Illumos #3006
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero Reviewed by Matt Ahrens <[email protected]> Reviewed by George Wilson <[email protected]> Approved by Eric Schrock <[email protected]> References: illumos/illumos-gate@fb09f5aad449c97fe309678f3f604982b563a96f https://illumos.org/issues/3006 Requires: zfsonlinux/spl@1c6d149feb4033e4a56fb987004edc5d45288bcb Ported-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1509
Diffstat (limited to 'module/zfs/dnode_sync.c')
-rw-r--r--module/zfs/dnode_sync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/dnode_sync.c b/module/zfs/dnode_sync.c
index 58fa473cb..76e603753 100644
--- a/module/zfs/dnode_sync.c
+++ b/module/zfs/dnode_sync.c
@@ -274,7 +274,7 @@ free_children(dmu_buf_impl_t *db, uint64_t blkid, uint64_t nblks, int trunc,
continue;
rw_enter(&dn->dn_struct_rwlock, RW_READER);
err = dbuf_hold_impl(dn, db->db_level-1, i, TRUE, FTAG, &subdb);
- ASSERT3U(err, ==, 0);
+ ASSERT0(err);
rw_exit(&dn->dn_struct_rwlock);
if (free_children(subdb, blkid, nblks, trunc, tx) == ALL) {
@@ -294,7 +294,7 @@ free_children(dmu_buf_impl_t *db, uint64_t blkid, uint64_t nblks, int trunc,
continue;
else if (i == end && !trunc)
continue;
- ASSERT3U(bp->blk_birth, ==, 0);
+ ASSERT0(bp->blk_birth);
}
#endif
ASSERT(all || blocks_freed == 0 || db->db_last_dirty);
@@ -350,7 +350,7 @@ dnode_sync_free_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx)
continue;
rw_enter(&dn->dn_struct_rwlock, RW_READER);
err = dbuf_hold_impl(dn, dnlevel-1, i, TRUE, FTAG, &db);
- ASSERT3U(err, ==, 0);
+ ASSERT0(err);
rw_exit(&dn->dn_struct_rwlock);
if (free_children(db, blkid, nblks, trunc, tx) == ALL) {
@@ -475,7 +475,7 @@ dnode_sync_free(dnode_t *dn, dmu_tx_t *tx)
* Our contents should have been freed in dnode_sync() by the
* free range record inserted by the caller of dnode_free().
*/
- ASSERT3U(DN_USED_BYTES(dn->dn_phys), ==, 0);
+ ASSERT0(DN_USED_BYTES(dn->dn_phys));
ASSERT(BP_IS_HOLE(dn->dn_phys->dn_blkptr));
dnode_undirty_dbufs(&dn->dn_dirty_records[txgoff]);