aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_rebuild.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/vdev_rebuild.c')
-rw-r--r--module/zfs/vdev_rebuild.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/vdev_rebuild.c b/module/zfs/vdev_rebuild.c
index 00ebd4c9f..8a8b02cab 100644
--- a/module/zfs/vdev_rebuild.c
+++ b/module/zfs/vdev_rebuild.c
@@ -1087,7 +1087,8 @@ vdev_rebuild_stop_wait(vdev_t *vd)
{
spa_t *spa = vd->vdev_spa;
- ASSERT(MUTEX_HELD(&spa_namespace_lock));
+ ASSERT(MUTEX_HELD(&spa_namespace_lock) ||
+ spa->spa_export_thread == curthread);
if (vd == spa->spa_root_vdev) {
for (uint64_t i = 0; i < vd->vdev_children; i++)