diff mbox series

[10/16] btrfs: directly grab inode at __btrfs_debug_check_extent_io_range()

Message ID 38625dad0acc6260fcefb0a15d359c4a3d4fe9b4.1744046765.git.fdmanana@suse.com (mailing list archive)
State New
Headers show
Series btrfs: some cleanups for extent-io-tree (mostly renames) | expand

Commit Message

Filipe Manana April 7, 2025, 5:36 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

We've tested that we are dealing with io tree that is associated to an
inode (its owner is IO_TREE_INODE_IO), so there's no need to call
btrfs_extent_io_tree_to_inode() in a separate line and we just assign
tree->inode to the local inode variable when we declare it.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent-io-tree.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c
index abf0f83a15cb..6330071cc73f 100644
--- a/fs/btrfs/extent-io-tree.c
+++ b/fs/btrfs/extent-io-tree.c
@@ -59,13 +59,12 @@  static inline void __btrfs_debug_check_extent_io_range(const char *caller,
 						       struct extent_io_tree *tree,
 						       u64 start, u64 end)
 {
-	const struct btrfs_inode *inode;
+	const struct btrfs_inode *inode = tree->inode;
 	u64 isize;
 
 	if (tree->owner != IO_TREE_INODE_IO)
 		return;
 
-	inode = btrfs_extent_io_tree_to_inode(tree);
 	isize = i_size_read(&inode->vfs_inode);
 	if (end >= PAGE_SIZE && (end % 2) == 0 && end != isize - 1) {
 		btrfs_debug_rl(inode->root->fs_info,