Commit a24a8dd8 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] md: break out of a loop that doesn't need to run to completion

Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a8745db2
...@@ -1672,8 +1672,10 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i ...@@ -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++) { for (j=0; j<conf->copies;j++) {
int d = r10_bio->devs[j].devnum; int d = r10_bio->devs[j].devnum;
if (conf->mirrors[d].rdev == NULL || 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; still_degraded = 1;
break;
}
} }
must_sync = bitmap_start_sync(mddev->bitmap, sect, must_sync = bitmap_start_sync(mddev->bitmap, sect,
&sync_blocks, still_degraded); &sync_blocks, still_degraded);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment