diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 69650b1ac148..9fc9198fc5c4 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -4125,6 +4125,9 @@ static int raid10_run(struct mddev *mddev) if (!conf) goto out; + mddev->thread = conf->thread; + conf->thread = NULL; + if (mddev_is_clustered(conf->mddev)) { int fc, fo; @@ -4137,9 +4140,6 @@ static int raid10_run(struct mddev *mddev) } } - mddev->thread = conf->thread; - conf->thread = NULL; - if (mddev->queue) { blk_queue_max_discard_sectors(mddev->queue, UINT_MAX);