diff options
author | Filipe Manana <fdmanana@suse.com> | 2025-04-03 17:53:31 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-05-15 15:30:43 +0300 |
commit | 024b3bc190c06fd77d3db8126a63b1efeb641df9 (patch) | |
tree | ed9fd39ef607430d25cb274728211bbbb6117273 /fs/btrfs/compression.c | |
parent | 9633f48190d8187c0622cb3ebcb65503809ab3f9 (diff) | |
download | linux-024b3bc190c06fd77d3db8126a63b1efeb641df9.tar.xz |
btrfs: remove extent_io_tree_to_inode() and is_inode_io_tree()
These functions aren't used outside extent-io-tree.c, but yet one of them
(extent_io_tree_to_inode()) is unnecessarily exported in the header.
Furthermore their single use is in a pattern like this:
if (is_inode_io_tree(tree))
foo(extent_io_tree_to_inode(tree), ...);
So we're effectively unnecessarily adding more indirection, checking
twice if tree->owner == IO_TREE_INODE_IO before getting the inode and
doing a non-inline function call to get tree->inode.
Simplify this by removing these helper functions and instead doing
thing like this:
if (tree->owner == IO_TREE_INODE_IO)
foo(tree->inode, ...);
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
0 files changed, 0 insertions, 0 deletions