summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2021-11-05 16:45:43 -0400
committerDavid Sterba <dsterba@suse.com>2022-01-03 15:09:48 +0100
commitce5603d015edc44faa0b46157f9ab7a9355a3e28 (patch)
tree2adcf680f1dd7eea7b00243ce4a5e59be1ad8528
parent30a9da5d8d494dda15d4b79a8596445140d3aac9 (diff)
downloadlinux-ce5603d015edc44faa0b46157f9ab7a9355a3e28.tar.gz
linux-ce5603d015edc44faa0b46157f9ab7a9355a3e28.tar.bz2
linux-ce5603d015edc44faa0b46157f9ab7a9355a3e28.zip
btrfs: don't use the extent_root in flush_space
We only need the root to start a transaction, and since it's a global root we can pick anything, change to the tree_root as we'll have a lot of extent roots in the future. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/space-info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index dc4b4b0372d1..79fe0ad17acf 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -617,7 +617,7 @@ static void flush_space(struct btrfs_fs_info *fs_info,
struct btrfs_space_info *space_info, u64 num_bytes,
enum btrfs_flush_state state, bool for_preempt)
{
- struct btrfs_root *root = fs_info->extent_root;
+ struct btrfs_root *root = fs_info->tree_root;
struct btrfs_trans_handle *trans;
int nr;
int ret = 0;