]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
btrfs: initialize delayed inodes xarray without GFP_ATOMIC
authorFilipe Manana <fdmanana@suse.com>
Wed, 17 Apr 2024 15:06:13 +0000 (16:06 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:07 +0000 (21:31 +0200)
There's no need to initialize the delayed inodes xarray with a GFP_ATOMIC
flag because that actually does nothing on the xarray operations. That was
needed for radix trees, but for xarrays the allocation flags are passed as
the last argument to xa_store() (which we are using correctly).

So initialize the delayed inodes xarray with a simple xa_init().

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c

index c2dc88f909b0c0e1e424fcf0d0c7d8a3cec8af8c..3606fb18531e5e17e7f4948882832e9711dcd47f 100644 (file)
@@ -663,8 +663,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;
-       /* GFP flags are compatible with XA_FLAGS_*. */
-       xa_init_flags(&root->delayed_nodes, GFP_ATOMIC);
+       xa_init(&root->delayed_nodes);
 
        btrfs_init_root_block_rsv(root);