From: NeilBrown Date: Fri, 6 Jan 2006 08:20:35 +0000 (-0800) Subject: [PATCH] md: break out of a loop that doesn't need to run to completion X-Git-Tag: v2.6.16-rc1~936^2~26 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a24a8dd858e0ba50f06a9fd8f61fe8c4fe7a8d8e;p=linux-2.6 [PATCH] md: break out of a loop that doesn't need to run to completion Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 254b50e321..253322ae91 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; jcopies;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);