btrfs: move leaf_data_end into ctree.c
authorJosef Bacik <josef@toxicpanda.com>
Tue, 15 Nov 2022 16:16:11 +0000 (11:16 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:58 +0000 (18:00 +0100)
commit3a3178c7f7675661d7bd0c67f57420e20982bd34
treecaf19474815271435ee20255f2e7de98a08e7ea6
parent1fe5ebc4e17dfbffeefe52abab75b02ad0f3a97e
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>
fs/btrfs/accessors.h
fs/btrfs/ctree.c
fs/btrfs/extent_io.c