Remove unused variable in vdev_add_child()

Commit c3520e7 restructured vdev_add_child() in such a way that
the spa variable was unused during non-debug builds.  This is
consistent with the upstream illumos code but because ZoL, unlike
illumos, is built with all compiler warnings enabled this causes
a legitimate warning.  Revert this hunk of the patch to keep the
build clean.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #3432
This commit is contained in:
Brian Behlendorf 2015-06-11 10:17:59 -07:00
parent c3520e7f1f
commit 44de2f02d6

View File

@ -206,9 +206,8 @@ vdev_add_child(vdev_t *pvd, vdev_t *cvd)
size_t oldsize, newsize;
uint64_t id = cvd->vdev_id;
vdev_t **newchild;
spa_t *spa = cvd->vdev_spa;
ASSERT(spa_config_held(spa, SCL_ALL, RW_WRITER) == SCL_ALL);
ASSERT(spa_config_held(cvd->vdev_spa, SCL_ALL, RW_WRITER) == SCL_ALL);
ASSERT(cvd->vdev_parent == NULL);
cvd->vdev_parent = pvd;