Btrfs: remove BUG() in btrfs_extent_inline_ref_size
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 18 Aug 2017 21:15:20 +0000 (15:15 -0600)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2017 15:47:43 +0000 (17:47 +0200)
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 <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h

index 542db9d0dbcd7379491cce7565da2811cea1482d..b7cfc74c175781906bea95d70c2d0c255c1dc045 100644 (file)
@@ -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;
 }