diff --git a/drivers/md/md.c b/drivers/md/md.c index e88381beb209..42fca0cec8e4 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9958,8 +9958,10 @@ void md_do_sync(struct md_thread *thread) */ md_new_event(); - if (last_check + window > io_sectors || j == max_sectors) + if (last_check + window > io_sectors || j == max_sectors) { + cond_resched(); continue; + } last_check = io_sectors; repeat: