aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-06-16 16:00:33 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-02 16:31:53 -0700
commitd571e2bcf7b4f0cf8da41fed61d95c4c1b247d40 (patch)
tree7bc856151191c863a28ee68ab3d3e050013659b3
parentda4dec0d172d4a7e27d9530b5dd0c959d3af0a6f (diff)
md/raid5: add missing call to schedule() after prepare_to_wait()
commit 7a3ab908948b6296ee7e81d42f7c176361c51975 upstream. 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. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/md/raid5.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 224de022e7c..562ab63ab57 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3431,6 +3431,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;
}
}