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-Url: https://git.stricted.de/?a=commitdiff_plain;h=a24a8dd858e0ba50f06a9fd8f61fe8c4fe7a8d8e;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 254b50e3213..253322ae919 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);