]> 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)
commit3c7e68071f64dffb5c5ffa8cc43f240327573b7f
tree32fcfadaf1faf1f62edb2f2a2737d8a335bf43c6
parentc7a7d870b55746aee2fbeb798552e13d99a5a2dd
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