]> git.hungrycats.org Git - linux/commit
btrfs: push __setup_root into btrfs_alloc_root
authorJosef Bacik <josef@toxicpanda.com>
Tue, 26 Nov 2019 19:24:59 +0000 (11:24 -0800)
committerJosef Bacik <josef@toxicpanda.com>
Fri, 6 Dec 2019 16:34:48 +0000 (08:34 -0800)
commitd6fbac9bb8a184d4d4988f9fb4611b5317e75f84
tree9f73af30c3fb242aa02ee675d63eaa10959010d9
parent618d7ffd3cf46f03c25d8e9d5490bd4db2f55b19
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.

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