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, 28 Feb 2022 15:19:49 +0000 (16:19 +0100)
commit1451122fe5d5190bed9095f775f5c868a0f6ccec
treee0a3c94a1055966a4780d934c8584930f961f9f3
parent22263d6ec2796d171e87cf8a0c1ba9adb1d4035d
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