diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index 21a7d4ad5..b59f7dfc8 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -3490,8 +3490,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id) */ if (ztest_device_removal_active) { spa_config_exit(spa, SCL_ALL, FTAG); - mutex_exit(&ztest_vdev_lock); - return; + goto out; } /*