Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2004-06-04 20:58:28 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-04 20:58:28 -0700
commita9b7c3577aa273dba2d44a6286cb39dc2b5d3d0e (patch)
tree707498f3b8bb120cdd71d4cc700feaf8e53fa7b9
parent0c6077193ff244514dba9edc7a7bd204d6ba2165 (diff)
[PATCH] md: fix BUG in raid5 resync code.
This condtion on this loop is primarily to avoid the loop if it doesn't appear to be needed. However it optimises a little too much and there is a case where it skips the loop when it is really needed. This patch fixes it. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/md/raid5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 6d93f0bc63dd..773f9bfe78fa 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1037,7 +1037,7 @@ static void handle_stripe(struct stripe_head *sh)
* parity, or to satisfy requests
* or to load a block that is being partially written.
*/
- if (to_read || non_overwrite || (syncing && (uptodate+failed < disks))) {
+ if (to_read || non_overwrite || (syncing && (uptodate < disks))) {
for (i=disks; i--;) {
dev = &sh->dev[i];
if (!test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) &&