btrfs: don't take an extra root ref at allocation time
authorJosef Bacik <josef@toxicpanda.com>
Fri, 14 Feb 2020 21:11:45 +0000 (16:11 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:59 +0000 (17:01 +0100)
commit4785e24fa5d23b05bc0f579e10aeb44c4a0a2a3d
tree5c012c74cb6a64b4337b7b14a974176d0e47addf
parentdc9492c14c758639d7b2468d4ed3c77e785c1a35
btrfs: don't take an extra root ref at allocation time

Now that all the users of roots take references for them we can drop the
extra root ref we've been taking.  Before we had roots at 2 refs for the
life of the file system, one for the radix tree, and one simply for
existing.  Now that we have proper ref accounting in all places that use
roots we can drop this extra ref simply for existing as we no longer
need it.

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
fs/btrfs/tests/qgroup-tests.c