瀏覽代碼

Btrfs: Fix a jump typo of nodatasum_case to avoid wrong WARN_ON()

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>
Zhao Lei 10 年之前
父節點
當前提交
b25c94c580
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      fs/btrfs/scrub.c

+ 2 - 1
fs/btrfs/scrub.c

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