]> err.no Git - linux-2.6/commitdiff
[PATCH] md: break out of a loop that doesn't need to run to completion
authorNeilBrown <neilb@suse.de>
Fri, 6 Jan 2006 08:20:35 +0000 (00:20 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:34:06 +0000 (08:34 -0800)
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid10.c

index 254b50e321351398ee7e2ef2b27c6bf3b85aa64c..253322ae9195d938c3d82cb7af948cc205f763f9 100644 (file)
@@ -1672,8 +1672,10 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
                                for (j=0; j<conf->copies;j++) {
                                        int d = r10_bio->devs[j].devnum;
                                        if (conf->mirrors[d].rdev == NULL ||
-                                           test_bit(Faulty, &conf->mirrors[d].rdev->flags))
+                                           test_bit(Faulty, &conf->mirrors[d].rdev->flags)) {
                                                still_degraded = 1;
+                                               break;
+                                       }
                                }
                                must_sync = bitmap_start_sync(mddev->bitmap, sect,
                                                              &sync_blocks, still_degraded);