summaryrefslogtreecommitdiff
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2015-01-20 10:11:39 +0300
committerChris Mason <clm@fb.com>2015-01-22 05:06:48 +0300
commitdc5f7a3bd820883793bb0d9789e938a34aa4da5f (patch)
tree67367f8abf5106c522a2f7a20f21f0f829374c7f /fs/btrfs/scrub.c
parent7653947fe6d59db72fbc26c4fc9ef842febc79e3 (diff)
downloadlinux-dc5f7a3bd820883793bb0d9789e938a34aa4da5f.tar.xz
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 <zhaolei@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r--fs/btrfs/scrub.c2
1 files changed, 1 insertions, 1 deletions
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;