Skip to content

Commit

Permalink
Btrfs: Break loop when reach BTRFS_MAX_MIRRORS in scrub_setup_recheck…
Browse files Browse the repository at this point in the history
…_block()

Use break instead of useless loop should be more suitable in this
case.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
zhaoleidd authored and masoncl committed Jan 22, 2015
1 parent 7653947 commit dc5f7a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dc5f7a3

Please sign in to comment.