Commit dc5f7a3b authored by Zhao Lei's avatar Zhao Lei Committed by Chris Mason
Browse files

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: default avatarZhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 7653947f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;