]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "btrfs: turn delayed_nodes_tree into an XArray"
authorDavid Sterba <dsterba@suse.com>
Fri, 15 Jul 2022 11:59:45 +0000 (13:59 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 15 Jul 2022 17:15:19 +0000 (19:15 +0200)
commit7191a077ec87b5ffb19a1e2b0733cf07ca88631f
tree13e37c09db99b4675ae4fe676f470d562b5ebc6d
parentbc37db94e32169f62989f0e813733886fc3eaa93
Revert "btrfs: turn delayed_nodes_tree into an XArray"

This reverts commit 502e1d9fb7de355941ee57d013e1ed929b4aa765.

Revert the xarray conversion, there's a problem with potential
sleep-inside-spinlock [1] when calling xa_insert that triggers GFP_NOFS
allocation. The radix tree used the preloading mechanism to avoid
sleeping but this is not available in xarray.

Conversion from spin lock to mutex is possible but at time of rc6 is
riskier than a clean revert.

[1] https://lore.kernel.org/linux-btrfs/cover.1657097693.git.fdmanana@suse.com/

Reported-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/delayed-inode.c
fs/btrfs/disk-io.c
fs/btrfs/inode.c