]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use btrfs_read_node_slot in btrfs_realloc_node
authorJosef Bacik <josef@toxicpanda.com>
Thu, 5 Nov 2020 15:45:10 +0000 (10:45 -0500)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:54:06 +0000 (15:54 +0100)
commit8e802b88f8b4e4040e73d0edc1965993ef840ca4
tree5d46f6fa91680bdcfd4c54e0aab2882412181af2
parentf45efead3f0316f15dc8704a3a284cad3de702d9
btrfs: use btrfs_read_node_slot in btrfs_realloc_node

We have this open-coded nightmare in btrfs_realloc_node that does
the same thing that the normal read path does, which is to see if we
have the eb in memory already, and if not read it, and verify the eb is
uptodate.  Delete this open coding and simply use btrfs_read_node_slot.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
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/ctree.c