aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorGabriel Niebler <[email protected]>2022-04-26 09:43:04 +0000
committerDavid Sterba <[email protected]>2022-05-16 15:03:16 +0000
commit253bf57555e451dec5a7f09dc95d380ce8b10e5b (patch)
tree10deeea6290ca98bd6b4f9dcc2f4952675da7ada /fs/btrfs/disk-io.c
parentbtrfs: use ilog2() to replace if () branches for btrfs_bg_flags_to_raid_index() (diff)
downloadkernel-253bf57555e451dec5a7f09dc95d380ce8b10e5b.tar.gz
kernel-253bf57555e451dec5a7f09dc95d380ce8b10e5b.zip
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 <[email protected]> Signed-off-by: Gabriel Niebler <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c2
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);