]> git.hungrycats.org Git - linux/commitdiff
Btrfs: Fix a jump typo of nodatasum_case to avoid wrong WARN_ON()
authorZhao Lei <zhaolei@cn.fujitsu.com>
Tue, 20 Jan 2015 07:11:35 +0000 (15:11 +0800)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Sat, 7 Mar 2015 22:02:02 +0000 (17:02 -0500)
if (sctx->is_dev_replace && !is_metadata && !have_csum) {
    ...
    goto nodatasum_case;
}
...
nodatasum_case:
    WARN_ON(sctx->is_dev_replace);

In above code, nodatasum_case marker should be moved after
WARN_ON().

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>
(cherry picked from commit b25c94c580c27bb6cff1e2f478746e77119215ad)

fs/btrfs/scrub.c

index 67ddf9a6f437bb694e52cbc35cfbc506c8d7bf81..51db0990c80a2993d7ba22e903e7f276894325d5 100644 (file)
@@ -1036,9 +1036,10 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
        if (!is_metadata && !have_csum) {
                struct scrub_fixup_nodatasum *fixup_nodatasum;
 
-nodatasum_case:
                WARN_ON(sctx->is_dev_replace);
 
+nodatasum_case:
+
                /*
                 * !is_metadata and !have_csum, this means that the data
                 * might not be COW'ed, that it might be modified