diff options
author | Gabriel Niebler <gniebler@suse.com> | 2022-04-26 11:43:04 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-05-16 17:03:16 +0200 |
commit | 253bf57555e451dec5a7f09dc95d380ce8b10e5b (patch) | |
tree | 10deeea6290ca98bd6b4f9dcc2f4952675da7ada /fs/btrfs/disk-io.c | |
parent | 719fae8920e4f42643ea306b95addb40bec87a25 (diff) |
btrfs: turn delayed_nodes_tree into an XArray
… in the btrfs_root struct and adjust all usages of this object to use
the XArray API, because it is notionally easier to use and understand,
as it provides array semantics, and also takes care of locking for us,
further simplifying the code.
Also use the opportunity to do some light refactoring.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Gabriel Niebler <gniebler@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 7ce945db1243..15eccd8f3b1b 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1160,7 +1160,7 @@ static void __setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info, root->nr_delalloc_inodes = 0; root->nr_ordered_extents = 0; root->inode_tree = RB_ROOT; - INIT_RADIX_TREE(&root->delayed_nodes_tree, GFP_ATOMIC); + xa_init_flags(&root->delayed_nodes, GFP_ATOMIC); btrfs_init_root_block_rsv(root); |