From: Josef Bacik Date: Fri, 5 Nov 2021 20:45:42 +0000 (-0400) Subject: btrfs: don't use extent_root in iterate_extent_inodes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=30a9da5d8d494dda15d4b79a8596445140d3aac9;p=linux.git btrfs: don't use extent_root in iterate_extent_inodes We are going to have many extent_roots soon, and we don't need a root here necessarily as we're not modifying anything, we're just getting the trans handle so we can have an accurate view of references, so use the tree_root here. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index c6320c43319a3..b51f8f90f226a 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1969,7 +1969,7 @@ int iterate_extent_inodes(struct btrfs_fs_info *fs_info, extent_item_objectid); if (!search_commit_root) { - trans = btrfs_attach_transaction(fs_info->extent_root); + trans = btrfs_attach_transaction(fs_info->tree_root); if (IS_ERR(trans)) { if (PTR_ERR(trans) != -ENOENT && PTR_ERR(trans) != -EROFS)