From: Zhao Lei Date: Tue, 20 Jan 2015 07:11:39 +0000 (+0800) Subject: Btrfs: Break loop when reach BTRFS_MAX_MIRRORS in scrub_setup_recheck_block() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc5f7a3bd820883793bb0d9789e938a34aa4da5f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Btrfs: Break loop when reach BTRFS_MAX_MIRRORS in scrub_setup_recheck_block() Use break instead of useless loop should be more suitable in this case. Signed-off-by: Zhao Lei Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index f9e108bdfc45..68867b2e4620 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -1394,7 +1394,7 @@ static int scrub_setup_recheck_block(struct scrub_ctx *sctx, struct scrub_page *page; if (mirror_index >= BTRFS_MAX_MIRRORS) - continue; + break; sblock = sblocks_for_recheck + mirror_index; sblock->sctx = sctx;