]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: avoid redundant call to get inline ref type at check_committed_ref()
authorFilipe Manana <fdmanana@suse.com>
Mon, 9 Dec 2024 16:07:12 +0000 (16:07 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:16 +0000 (14:53 +0100)
commit78cdfba85df90fe0eb507f2fe86eba7c8f51fe4c
treeb2710140a17834dbb9c62e13b9eaa06e4560e5f1
parent4f000a87fbfe6522a6f43d44d1dfc6af157ce476
btrfs: avoid redundant call to get inline ref type at check_committed_ref()

At check_committed_ref() we are calling btrfs_get_extent_inline_ref_type()
twice, once before we check if have an inline extent owner ref (for simple
qgroups) and then once again sometime after that check. This second call
is redundant when we have simple quotas disabled or we found an inline ref
that is not of the owner ref type. So avoid this second call unless we
have simple quotas enabled and found an owner ref, saving a function call
that does inline ref validation again.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c