Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c @@ -115,27 +115,14 @@ if (error == 0) { char *old_physpath; + /* g_topology lock ensures that vdev has not been closed */ + g_topology_assert(); old_physpath = vd->vdev_physpath; vd->vdev_physpath = spa_strdup(physpath); spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); - if (old_physpath != NULL) { - int held_lock; - - held_lock = spa_config_held(spa, SCL_STATE, RW_WRITER); - if (held_lock == 0) { - g_topology_unlock(); - spa_config_enter(spa, SCL_STATE, FTAG, - RW_WRITER); - } - + if (old_physpath != NULL) spa_strfree(old_physpath); - - if (held_lock == 0) { - spa_config_exit(spa, SCL_STATE, FTAG); - g_topology_lock(); - } - } } g_free(physpath); }