libbtrfs: drop BUG_ONs from ctree.h
Remove BUG_ONs that seem to be sanity checks that are done in other places. We want to remove them from public header so BUG_ON can be removed completely. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2830e84135
commit
d7bd967a78
|
@ -356,7 +356,6 @@ struct btrfs_free_space_header {
|
|||
|
||||
static inline unsigned long btrfs_chunk_item_size(int num_stripes)
|
||||
{
|
||||
BUG_ON(num_stripes == 0);
|
||||
return sizeof(struct btrfs_chunk) +
|
||||
sizeof(struct btrfs_stripe) * (num_stripes - 1);
|
||||
}
|
||||
|
@ -1375,8 +1374,6 @@ static inline u32 BTRFS_NODEPTRS_PER_BLOCK(const struct btrfs_fs_info *info)
|
|||
|
||||
static inline u32 BTRFS_NODEPTRS_PER_EXTENT_BUFFER(const struct extent_buffer *eb)
|
||||
{
|
||||
BUG_ON(!eb->fs_info);
|
||||
BUG_ON(eb->fs_info->nodesize != eb->len);
|
||||
return BTRFS_LEAF_DATA_SIZE(eb->fs_info) / sizeof(struct btrfs_key_ptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue