From: Liu Bo Date: Fri, 18 Aug 2017 21:15:20 +0000 (-0600) Subject: Btrfs: remove BUG() in btrfs_extent_inline_ref_size X-Git-Tag: v4.14-rc1~80^2~9 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=4335958de2a43c6790c7f6aa0682aa7189983fa4;p=linux.git Btrfs: remove BUG() in btrfs_extent_inline_ref_size Now that btrfs_get_extent_inline_ref_type() can report if type is a valid one and all callers can gracefully deal with that, we don't need to crash here. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 542db9d0dbcd..b7cfc74c1757 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1804,7 +1804,6 @@ static inline u32 btrfs_extent_inline_ref_size(int type) if (type == BTRFS_EXTENT_DATA_REF_KEY) return sizeof(struct btrfs_extent_data_ref) + offsetof(struct btrfs_extent_inline_ref, offset); - BUG(); return 0; }