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

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
...@@ -1394,7 +1394,7 @@ static int scrub_setup_recheck_block(struct scrub_ctx *sctx, ...@@ -1394,7 +1394,7 @@ static int scrub_setup_recheck_block(struct scrub_ctx *sctx,
struct scrub_page *page; struct scrub_page *page;
if (mirror_index >= BTRFS_MAX_MIRRORS) if (mirror_index >= BTRFS_MAX_MIRRORS)
continue; break;
sblock = sblocks_for_recheck + mirror_index; sblock = sblocks_for_recheck + mirror_index;
sblock->sctx = sctx; sblock->sctx = sctx;
......
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