diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index db4de8e07cd9..3983d5c8b5cd 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -927,6 +927,7 @@ static void flush_pending_writes(struct r10conf *conf) else generic_make_request(bio); bio = next; + cond_resched(); } blk_finish_plug(&plug); } else @@ -1112,6 +1113,7 @@ static void raid10_unplug(struct blk_plug_cb *cb, bool from_schedule) else generic_make_request(bio); bio = next; + cond_resched(); } kfree(plug); }