diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-11-15 11:16:18 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:58 +0100 |
commit | 8009adf306452e9b43db36f2d02fedfe5eca1b5e (patch) | |
tree | 2b85463ff6eba105048a0df3e0267e7789df753e /fs/btrfs/ctree.c | |
parent | 637e3b48c22e52daa645b49b73630af3f09328ae (diff) | |
download | linux-stable-8009adf306452e9b43db36f2d02fedfe5eca1b5e.tar.gz linux-stable-8009adf306452e9b43db36f2d02fedfe5eca1b5e.tar.bz2 linux-stable-8009adf306452e9b43db36f2d02fedfe5eca1b5e.zip |
btrfs: remove BTRFS_LEAF_DATA_OFFSET
This is simply the same thing as btrfs_item_nr_offset(leaf, 0), so
remove this helper and replace it's usage with the above statement.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index b5d203045dc7..76b99bcc849d 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -83,8 +83,8 @@ static inline void memmove_leaf_data(const struct extent_buffer *leaf, unsigned long src_offset, unsigned long len) { - memmove_extent_buffer(leaf, BTRFS_LEAF_DATA_OFFSET + dst_offset, - BTRFS_LEAF_DATA_OFFSET + src_offset, len); + memmove_extent_buffer(leaf, btrfs_item_nr_offset(leaf, 0) + dst_offset, + btrfs_item_nr_offset(leaf, 0) + src_offset, len); } /* @@ -106,8 +106,8 @@ static inline void copy_leaf_data(const struct extent_buffer *dst, unsigned long dst_offset, unsigned long src_offset, unsigned long len) { - copy_extent_buffer(dst, src, BTRFS_LEAF_DATA_OFFSET + dst_offset, - BTRFS_LEAF_DATA_OFFSET + src_offset, len); + copy_extent_buffer(dst, src, btrfs_item_nr_offset(dst, 0) + dst_offset, + btrfs_item_nr_offset(src, 0) + src_offset, len); } /* |