diff --git a/module/zfs/vdev_rebuild.c b/module/zfs/vdev_rebuild.c index bf1079fd7a..85ed8afe1c 100644 --- a/module/zfs/vdev_rebuild.c +++ b/module/zfs/vdev_rebuild.c @@ -911,6 +911,8 @@ vdev_rebuild_thread(void *arg) spa_config_exit(spa, SCL_CONFIG, FTAG); cv_broadcast(&vd->vdev_rebuild_cv); + + thread_exit(); } /* diff --git a/module/zfs/vdev_trim.c b/module/zfs/vdev_trim.c index a655e2fd2a..3f8c348060 100644 --- a/module/zfs/vdev_trim.c +++ b/module/zfs/vdev_trim.c @@ -1411,6 +1411,8 @@ vdev_autotrim_thread(void *arg) vd->vdev_autotrim_thread = NULL; cv_broadcast(&vd->vdev_autotrim_cv); mutex_exit(&vd->vdev_autotrim_lock); + + thread_exit(); } /*