mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Prefer VERIFY0P(n) over VERIFY(n == NULL)
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:
committed by
Brian Behlendorf
parent
611b95da18
commit
f7bdd84328
+4
-4
@@ -554,7 +554,7 @@ vdev_add_child(vdev_t *pvd, vdev_t *cvd)
|
||||
vdev_t **newchild;
|
||||
|
||||
ASSERT(spa_config_held(cvd->vdev_spa, SCL_ALL, RW_WRITER) == SCL_ALL);
|
||||
ASSERT(cvd->vdev_parent == NULL);
|
||||
ASSERT0P(cvd->vdev_parent);
|
||||
|
||||
cvd->vdev_parent = pvd;
|
||||
|
||||
@@ -578,7 +578,7 @@ vdev_add_child(vdev_t *pvd, vdev_t *cvd)
|
||||
pvd->vdev_nonrot &= cvd->vdev_nonrot;
|
||||
|
||||
cvd->vdev_top = (pvd->vdev_top ? pvd->vdev_top: cvd);
|
||||
ASSERT(cvd->vdev_top->vdev_parent->vdev_parent == NULL);
|
||||
ASSERT0P(cvd->vdev_top->vdev_parent->vdev_parent);
|
||||
|
||||
/*
|
||||
* Walk up all ancestors to update guid sum.
|
||||
@@ -1133,7 +1133,7 @@ vdev_free(vdev_t *vd)
|
||||
for (int c = 0; c < vd->vdev_children; c++)
|
||||
vdev_free(vd->vdev_child[c]);
|
||||
|
||||
ASSERT(vd->vdev_child == NULL);
|
||||
ASSERT0P(vd->vdev_child);
|
||||
ASSERT(vd->vdev_guid_sum == vd->vdev_guid);
|
||||
|
||||
if (vd->vdev_ops->vdev_op_fini != NULL)
|
||||
@@ -1162,7 +1162,7 @@ vdev_free(vdev_t *vd)
|
||||
*/
|
||||
vdev_remove_child(vd->vdev_parent, vd);
|
||||
|
||||
ASSERT(vd->vdev_parent == NULL);
|
||||
ASSERT0P(vd->vdev_parent);
|
||||
ASSERT(!list_link_active(&vd->vdev_leaf_node));
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user