From: Yu Kuai <yukuai3@xxxxxxxxxx> mddev_suspend() never stop sync_thread, hence it dones't make sense to ignore suspended array in md_check_recovery(), which might cause sync_thread can't be unregistered. Before this patch, use stop_sync_thread() directly for syspended array will hang because md_check_recovery() can't clear MD_RECOVERY_RUNING, which is possible for dm-raid. Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx> --- drivers/md/md.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 2266358d8074..07b80278eaa5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9469,9 +9469,6 @@ static void md_start_sync(struct work_struct *ws) */ void md_check_recovery(struct mddev *mddev) { - if (READ_ONCE(mddev->suspended)) - return; - if (mddev->bitmap) md_bitmap_daemon_work(mddev); -- 2.39.2