提交 c293498b 编写于 作者: S Stoyan Gaydarov 提交者: Chris Mason

Btrfs: BUG to BUG_ON changes

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 3e7ad38d
......@@ -2157,8 +2157,7 @@ static int insert_ptr(struct btrfs_trans_handle *trans, struct btrfs_root
BUG_ON(!path->nodes[level]);
lower = path->nodes[level];
nritems = btrfs_header_nritems(lower);
if (slot > nritems)
BUG();
BUG_ON(slot > nritems);
if (nritems == BTRFS_NODEPTRS_PER_BLOCK(root))
BUG();
if (slot != nritems) {
......
......@@ -253,8 +253,7 @@ int btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
if (ret) {
printk(KERN_ERR "btrfs: unable to add free space :%d\n", ret);
if (ret == -EEXIST)
BUG();
BUG_ON(ret == -EEXIST);
}
return ret;
......
......@@ -1222,8 +1222,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans,
ret = insert_one_name(trans, root, path, key->objectid, key->offset,
name, name_len, log_type, &log_key);
if (ret && ret != -ENOENT)
BUG();
BUG_ON(ret && ret != -ENOENT);
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册