]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: push __setup_root into btrfs_alloc_root
authorJosef Bacik <josef@toxicpanda.com>
Fri, 24 Jan 2020 14:32:18 +0000 (09:32 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:25 +0000 (17:01 +0100)
commitab0da2025e0973d75c6f7cab8c0d0ac6bde4f73a
tree32fcfadaf1faf1f62edb2f2a2737d8a335bf43c6
parent1abf5d2c23d770bff130efd3b2f5c141bafc317a
btrfs: push __setup_root into btrfs_alloc_root

There's no reason to not init the root at alloc time, and with later
patches it actually causes problems if we error out mounting the fs
before the tree_root is init'ed because we expect it to have a valid ref
count.  Fix this by pushing __setup_root into btrfs_alloc_root.

Reviewed-by: Nikolay Borisov <nborisov@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/disk-io.c