summaryrefslogtreecommitdiff
path: root/fs/btrfs/accessors.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2022-11-15 11:16:11 -0500
committerDavid Sterba <dsterba@suse.com>2022-12-05 18:00:58 +0100
commit3a3178c7f7675661d7bd0c67f57420e20982bd34 (patch)
treecaf19474815271435ee20255f2e7de98a08e7ea6 /fs/btrfs/accessors.h
parent1fe5ebc4e17dfbffeefe52abab75b02ad0f3a97e (diff)
btrfs: move leaf_data_end into ctree.c
This is only used in ctree.c, with the exception of zero'ing out extent buffers we're getting ready to write out. In theory we shouldn't have an extent buffer with 0 items that we're writing out, however I'd rather be safe than sorry so open code it in extent_io.c, and then copy the helper into ctree.c. This will make it easier to sync accessors.[ch] into btrfs-progs, as this requires a helper that isn't defined in accessors.h. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/accessors.h')
-rw-r--r--fs/btrfs/accessors.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/btrfs/accessors.h b/fs/btrfs/accessors.h
index 57ba6894a5f4..b9d9a69685df 100644
--- a/fs/btrfs/accessors.h
+++ b/fs/btrfs/accessors.h
@@ -897,19 +897,6 @@ const char *btrfs_super_csum_name(u16 csum_type);
const char *btrfs_super_csum_driver(u16 csum_type);
size_t __attribute_const__ btrfs_get_num_csums(void);
-/*
- * The leaf data grows from end-to-front in the node. this returns the address
- * of the start of the last item, which is the stop of the leaf data stack.
- */
-static inline unsigned int leaf_data_end(const struct extent_buffer *leaf)
-{
- u32 nr = btrfs_header_nritems(leaf);
-
- if (nr == 0)
- return BTRFS_LEAF_DATA_SIZE(leaf->fs_info);
- return btrfs_item_offset(leaf, nr - 1);
-}
-
/* struct btrfs_file_extent_item */
BTRFS_SETGET_STACK_FUNCS(stack_file_extent_type, struct btrfs_file_extent_item,
type, 8);