]> git.ipfire.org Git - people/ms/linux.git/commitdiff
btrfs: don't use the extent_root in flush_space
authorJosef Bacik <josef@toxicpanda.com>
Fri, 5 Nov 2021 20:45:43 +0000 (16:45 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Jan 2022 14:09:48 +0000 (15:09 +0100)
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>
fs/btrfs/space-info.c

index dc4b4b0372d12ed60c042b986027ae76eabd16f6..79fe0ad17acfa898ea6b39e52833386f3138fcea 100644 (file)
@@ -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;