From: Dan Williams Date: Tue, 16 Jun 2009 23:00:33 +0000 (-0700) Subject: md/raid5: add missing call to schedule() after prepare_to_wait() X-Git-Tag: v2.6.31-rc1~143^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7a3ab908948b6296ee7e81d42f7c176361c51975;p=karo-tx-linux.git md/raid5: add missing call to schedule() after prepare_to_wait() In the unlikely event that reshape progresses past the current request while it is waiting for a stripe we need to schedule() before retrying for 2 reasons: 1/ Prevent list corruption from duplicated list_add() calls without intervening list_del(). 2/ Give the reshape code a chance to make some progress to resolve the conflict. Cc: Signed-off-by: Dan Williams Signed-off-by: NeilBrown --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 8f2e3740a05a..59e29c2983cb 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3695,6 +3695,7 @@ static int make_request(struct request_queue *q, struct bio * bi) spin_unlock_irq(&conf->device_lock); if (must_retry) { release_stripe(sh); + schedule(); goto retry; } }