diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index 0756f57f37..6f095dad8e 100644 --- a/module/zfs/dsl_scan.c +++ b/module/zfs/dsl_scan.c @@ -1645,9 +1645,9 @@ dsl_scan_scrub_cb(dsl_pool_t *dp, size_t size = BP_GET_PSIZE(bp); spa_t *spa = dp->dp_spa; uint64_t phys_birth = BP_PHYSICAL_BIRTH(bp); - boolean_t needs_io; + boolean_t needs_io = B_FALSE; int zio_flags = ZIO_FLAG_SCRUB_THREAD | ZIO_FLAG_RAW | ZIO_FLAG_CANFAIL; - int zio_priority; + int zio_priority = 0; int d; if (phys_birth <= scn->scn_phys.scn_min_txg || diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index e4c1a7707f..1262052256 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -1465,10 +1465,9 @@ vdev_hold(vdev_t *vd) void vdev_rele(vdev_t *vd) { - spa_t *spa = vd->vdev_spa; int c; - ASSERT(spa_is_root(spa)); + ASSERT(spa_is_root(vd->vdev_spa)); for (c = 0; c < vd->vdev_children; c++) vdev_rele(vd->vdev_child[c]); @@ -3074,10 +3073,10 @@ vdev_is_bootable(vdev_t *vd) void vdev_load_log_state(vdev_t *nvd, vdev_t *ovd) { - spa_t *spa = nvd->vdev_spa; int c; - ASSERT(spa_config_held(spa, SCL_STATE_ALL, RW_WRITER) == SCL_STATE_ALL); + ASSERT3S(spa_config_held(nvd->vdev_spa, SCL_STATE_ALL, RW_WRITER), ==, + SCL_STATE_ALL); ASSERT3U(nvd->vdev_guid, ==, ovd->vdev_guid); for (c = 0; c < nvd->vdev_children; c++)