diff mbox series

[16/25] btrfs: don't use extent_root in iterate_extent_inodes

Message ID 534f9c43d3a3f2a99d2f0b008c2791982f464b1a.1636144971.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs: extent tree v2 prep work for global roots | expand

Commit Message

Josef Bacik Nov. 5, 2021, 8:45 p.m. UTC
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 <josef@toxicpanda.com>
---
 fs/btrfs/backref.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 72ca4334186c..0c5c7cc14604 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)