From: Josef Bacik Date: Fri, 5 Nov 2021 20:45:38 +0000 (-0400) Subject: btrfs: use chunk_root in find_free_extent_update_loop X-Git-Tag: perf_urgent_for_v5.17_rc2~53^2~70 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8e1d02909185bddc76e98e680d7fea38be0e87da;p=users%2Fdwmw2%2Flinux.git btrfs: use chunk_root in find_free_extent_update_loop We're only using this to start the transaction with to possibly allocate a chunk. It doesn't really matter which root to use, but with extent tree v2 we'll need a bytenr to look up a extent root which makes the usage of the extent_root awkward here. Simply change it to the chunk_root. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 49bc6de979def..ae25ca54cbe80 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3977,7 +3977,7 @@ static int find_free_extent_update_loop(struct btrfs_fs_info *fs_info, struct find_free_extent_ctl *ffe_ctl, bool full_search) { - struct btrfs_root *root = fs_info->extent_root; + struct btrfs_root *root = fs_info->chunk_root; int ret; if ((ffe_ctl->loop == LOOP_CACHING_NOWAIT) &&