]> 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)
commit1b51b4df21df581ef822c374b04e3dafe7787132
tree5d46f6fa91680bdcfd4c54e0aab2882412181af2
parent082a6b02afd353ab840b3d97400657aebb40d143
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