From 44de2f02d6b1365240f66fd5f3794ccbebd61a60 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 11 Jun 2015 10:17:59 -0700 Subject: [PATCH] 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 Issue #3432 --- module/zfs/vdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index fe2ecdc72..8e50ababc 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -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;