diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 32a917e5103a..55144f7d9303 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -902,6 +902,7 @@ static void flush_pending_writes(struct r10conf *conf) else submit_bio_noacct(bio); bio = next; + cond_resched(); } blk_finish_plug(&plug); } else @@ -1095,6 +1096,7 @@ static void raid10_unplug(struct blk_plug_cb *cb, bool from_schedule) else submit_bio_noacct(bio); bio = next; + cond_resched(); } kfree(plug); }