From: Filipe Manana Date: Fri, 4 Apr 2025 11:04:04 +0000 (+0100) Subject: btrfs: directly grab inode at __btrfs_debug_check_extent_io_range() X-Git-Tag: v6.16-rc1~214^2~140 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20612db4628d96ed0ca037d8b9cecd44d86270ed;p=thirdparty%2Fkernel%2Flinux.git btrfs: directly grab inode at __btrfs_debug_check_extent_io_range() 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. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c index abf0f83a15cb7..6330071cc73f9 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,