提交 14586651 编写于 作者: H HIMANGI SARAOGI 提交者: Chris Mason

Btrfs: use BUG_ON

Use BUG_ON(x) rather than if(x) BUG();

The semantic patch that fixes this problem is as follows:

// <smpl>
@@ identifier x; @@
-if (x) BUG();
+BUG_ON(x);
// </smpl>
Signed-off-by: NHimangi Saraogi <himangi774@gmail.com>
Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NChris Mason <clm@fb.com>
上级 78809913
...@@ -2677,8 +2677,8 @@ static int btrfs_relocate_sys_chunks(struct btrfs_root *root) ...@@ -2677,8 +2677,8 @@ static int btrfs_relocate_sys_chunks(struct btrfs_root *root)
found_key.offset); found_key.offset);
if (ret == -ENOSPC) if (ret == -ENOSPC)
failed++; failed++;
else if (ret) else
BUG(); BUG_ON(ret);
} }
if (found_key.offset == 0) if (found_key.offset == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册