aboutsummaryrefslogtreecommitdiffstats
path: root/uts/common/fs/zfs/vdev_removal.c
diff options
context:
space:
mode:
Diffstat (limited to 'uts/common/fs/zfs/vdev_removal.c')
-rw-r--r--uts/common/fs/zfs/vdev_removal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/uts/common/fs/zfs/vdev_removal.c b/uts/common/fs/zfs/vdev_removal.c
index e4d0224333ff..c6874ae06a3f 100644
--- a/uts/common/fs/zfs/vdev_removal.c
+++ b/uts/common/fs/zfs/vdev_removal.c
@@ -1688,6 +1688,9 @@ svr_sync(spa_t *spa, dmu_tx_t *tx)
spa_vdev_removal_t *svr = spa->spa_vdev_removal;
int txgoff = dmu_tx_get_txg(tx) & TXG_MASK;
+ if (svr == NULL)
+ return;
+
/*
* This check is necessary so that we do not dirty the
* DIRECTORY_OBJECT via spa_sync_removing_state() when there