Btrfs: BUG_ON is deleted from the caller of btrfs_truncate_item & btrfs_extend_item
Currently, btrfs_truncate_item and btrfs_extend_item returns only 0. So, the check by BUG_ON in the caller is unnecessary. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
committed by
Chris Mason
parent
65a246c5ff
commit
1cd307990d
@ -947,7 +947,6 @@ static int convert_extent_item_v0(struct btrfs_trans_handle *trans,
|
||||
BUG_ON(ret);
|
||||
|
||||
ret = btrfs_extend_item(trans, root, path, new_size);
|
||||
BUG_ON(ret);
|
||||
|
||||
leaf = path->nodes[0];
|
||||
item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item);
|
||||
@ -1555,7 +1554,6 @@ int setup_inline_extent_backref(struct btrfs_trans_handle *trans,
|
||||
size = btrfs_extent_inline_ref_size(type);
|
||||
|
||||
ret = btrfs_extend_item(trans, root, path, size);
|
||||
BUG_ON(ret);
|
||||
|
||||
ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item);
|
||||
refs = btrfs_extent_refs(leaf, ei);
|
||||
@ -1684,7 +1682,6 @@ int update_inline_extent_backref(struct btrfs_trans_handle *trans,
|
||||
end - ptr - size);
|
||||
item_size -= size;
|
||||
ret = btrfs_truncate_item(trans, root, path, item_size, 1);
|
||||
BUG_ON(ret);
|
||||
}
|
||||
btrfs_mark_buffer_dirty(leaf);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user