diff options
author | NeilBrown <neilb@suse.de> | 2006-01-06 00:20:35 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 08:34:06 -0800 |
commit | a24a8dd858e0ba50f06a9fd8f61fe8c4fe7a8d8e (patch) | |
tree | 14236abb515dcb8101ade92632d5da0d772d7330 | |
parent | a8745db232dd86f145bff6946e78f839acab511b (diff) | |
download | op-kernel-dev-a24a8dd858e0ba50f06a9fd8f61fe8c4fe7a8d8e.zip op-kernel-dev-a24a8dd858e0ba50f06a9fd8f61fe8c4fe7a8d8e.tar.gz |
[PATCH] md: break out of a loop that doesn't need to run to completion
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/md/raid10.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 254b50e..253322a 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -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); |