diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-10-21 14:58:36 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-03 15:09:43 +0100 |
commit | 5a08663d01c544bc1d0e552d060ccdda20e9103f (patch) | |
tree | df52b36ba6d5043be99ed56ca781f9fb04e94c77 /fs/btrfs/ctree.h | |
parent | 3212fa14e772913b69e85e080678472f8f1aecde (diff) |
btrfs: remove the btrfs_item_end() helper
We're only using btrfs_item_end() from btrfs_item_end_nr(), so this can
be collapsed.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 8f4807b7e1d0..1d4feb98aa88 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1976,17 +1976,6 @@ static inline struct btrfs_item *btrfs_item_nr(int nr) return (struct btrfs_item *)btrfs_item_nr_offset(nr); } -static inline u32 btrfs_item_end(const struct extent_buffer *eb, - struct btrfs_item *item) -{ - return btrfs_raw_item_offset(eb, item) + btrfs_raw_item_size(eb, item); -} - -static inline u32 btrfs_item_end_nr(const struct extent_buffer *eb, int nr) -{ - return btrfs_item_end(eb, btrfs_item_nr(nr)); -} - #define BTRFS_ITEM_SETGET_FUNCS(member) \ static inline u32 btrfs_item_##member(const struct extent_buffer *eb, \ int slot) \ @@ -2014,6 +2003,11 @@ static inline void btrfs_set_token_item_##member(struct btrfs_map_token *token, BTRFS_ITEM_SETGET_FUNCS(offset) BTRFS_ITEM_SETGET_FUNCS(size); +static inline u32 btrfs_item_end_nr(const struct extent_buffer *eb, int nr) +{ + return btrfs_item_offset(eb, nr) + btrfs_item_size(eb, nr); +} + static inline void btrfs_item_key(const struct extent_buffer *eb, struct btrfs_disk_key *disk_key, int nr) { |