OSDN Git Service

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)
commit206983b72a369c8fdc4fd55b3f46ec16f3c024ea
tree5d46f6fa91680bdcfd4c54e0aab2882412181af2
parentbfb484d922a317183d77b3b6db77a2ff659384cc
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