mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-01-14 17:22:05 +03:00
Prefer VERIFY0(n) over VERIFY3S(n, ==, 0)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #17591
This commit is contained in:
parent
5c7df3bcac
commit
611b95da18
@ -8978,7 +8978,7 @@ main(int argc, char **argv)
|
||||
exit(EXIT_FAILURE);
|
||||
} else {
|
||||
/* children should not be spawned if setting gvars fails */
|
||||
VERIFY3S(err, ==, 0);
|
||||
VERIFY0(err);
|
||||
}
|
||||
|
||||
/* Override location of zpool.cache */
|
||||
|
||||
@ -611,7 +611,7 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz,
|
||||
* processing so do not hash unlinked znodes.
|
||||
*/
|
||||
if (links > 0)
|
||||
VERIFY3S(insert_inode_locked(ip), ==, 0);
|
||||
VERIFY0(insert_inode_locked(ip));
|
||||
|
||||
mutex_enter(&zfsvfs->z_znodes_lock);
|
||||
list_insert_tail(&zfsvfs->z_all_znodes, zp);
|
||||
|
||||
@ -243,7 +243,7 @@ dsl_bookmark_create_check_impl(dsl_pool_t *dp,
|
||||
/* error is retval of the following if-cascade */
|
||||
if (strchr(source, '@') != NULL) {
|
||||
dsl_dataset_t *source_snap_ds;
|
||||
ASSERT3S(snapshot_namecheck(source, NULL, NULL), ==, 0);
|
||||
ASSERT0(snapshot_namecheck(source, NULL, NULL));
|
||||
error = dsl_dataset_hold(dp, source, FTAG, &source_snap_ds);
|
||||
if (error == 0) {
|
||||
VERIFY(source_snap_ds->ds_is_snapshot);
|
||||
@ -258,7 +258,7 @@ dsl_bookmark_create_check_impl(dsl_pool_t *dp,
|
||||
}
|
||||
} else if (strchr(source, '#') != NULL) {
|
||||
zfs_bookmark_phys_t source_phys;
|
||||
ASSERT3S(bookmark_namecheck(source, NULL, NULL), ==, 0);
|
||||
ASSERT0(bookmark_namecheck(source, NULL, NULL));
|
||||
/*
|
||||
* Source must exists and be an earlier point in newbm_ds's
|
||||
* timeline (newbm_ds's origin may be a snap of source's ds)
|
||||
|
||||
@ -207,7 +207,7 @@ insert_find_remove(zfs_btree_t *bt, char *why)
|
||||
"Found removed value (%llu)\n", *p);
|
||||
return (1);
|
||||
}
|
||||
ASSERT3S(zfs_btree_numnodes(bt), ==, 0);
|
||||
ASSERT0(zfs_btree_numnodes(bt));
|
||||
zfs_btree_verify(bt);
|
||||
|
||||
return (0);
|
||||
@ -279,7 +279,7 @@ drain_tree(zfs_btree_t *bt, char *why)
|
||||
node = avl_last(&avl);
|
||||
ASSERT3U(node->data, ==, *(uint64_t *)zfs_btree_last(bt, NULL));
|
||||
}
|
||||
ASSERT3S(zfs_btree_numnodes(bt), ==, 0);
|
||||
ASSERT0(zfs_btree_numnodes(bt));
|
||||
|
||||
void *avl_cookie = NULL;
|
||||
while ((node = avl_destroy_nodes(&avl, &avl_cookie)) != NULL)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user