]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: factor out do_free_extent_accounting helper
authorJosef Bacik <josef@toxicpanda.com>
Wed, 23 Feb 2022 19:06:46 +0000 (14:06 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:53 +0000 (13:13 +0100)
commit8f8aa4c7a9bde010211484a9c0475846acfc399f
tree5c0f8349576b7feaeb17db292db70b142706722d
parent5b2a54bb7c47c10ab6d96311d46a76b4a84f0b6f
btrfs: factor out do_free_extent_accounting helper

__btrfs_free_extent() does all of the hard work of updating the extent
ref items, and then at the end if we dropped the extent completely it
does the cleanup accounting work.  We're going to only want to do that
work for metadata with extent tree v2, so extract this bit into its own
helper.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c