Skip to content

Commit 3c0f3ed

Browse files
fdmananakdave
authored andcommitted
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 <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>
1 parent 60b0dc3 commit 3c0f3ed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/btrfs/extent-io-tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller,
5959
struct extent_io_tree *tree,
6060
u64 start, u64 end)
6161
{
62-
const struct btrfs_inode *inode;
62+
const struct btrfs_inode *inode = tree->inode;
6363
u64 isize;
6464

6565
if (tree->owner != IO_TREE_INODE_IO)
6666
return;
6767

68-
inode = btrfs_extent_io_tree_to_inode(tree);
6968
isize = i_size_read(&inode->vfs_inode);
7069
if (end >= PAGE_SIZE && (end % 2) == 0 && end != isize - 1) {
7170
btrfs_debug_rl(inode->root->fs_info,

0 commit comments

Comments
 (0)