summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/zfs/zfs_ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index b2f5db584..d195eded7 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -4946,7 +4946,8 @@ zfs_ioc_clear(zfs_cmd_t *zc)
vdev_clear(spa, vd);
- (void) spa_vdev_state_exit(spa, spa->spa_root_vdev, 0);
+ (void) spa_vdev_state_exit(spa, spa_suspended(spa) ?
+ NULL : spa->spa_root_vdev, 0);
/*
* Resume any suspended I/Os.