btrfs: abstract out loading the tree root
authorJosef Bacik <josef@toxicpanda.com>
Wed, 15 Dec 2021 20:40:06 +0000 (15:40 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Feb 2022 15:36:01 +0000 (16:36 +0100)
commit1d985b6fb40131769f4a46e28822015e4aba6b3a
tree9357c46bf90c8e2cc5b079b6e70813348abf6fb9
parent77db70015065951f08af173c7458871161559573
btrfs: abstract out loading the tree root

We're going to be adding more roots that need to be loaded from the
super block, so abstract out the code to read the tree_root from the
super block, and use this helper for the chunk root as well.  This will
make it simpler to load the new trees in the future.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c