btrfs: hold a ref for the root in btrfs_find_orphan_roots
authorJosef Bacik <josef@toxicpanda.com>
Fri, 24 Jan 2020 14:32:46 +0000 (09:32 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:30 +0000 (17:01 +0100)
commit0b2dee5cff7490b5e874d33537d4cfcf66e5ba0d
tree272c6488dd9f08e86b484e4db1cbad3c9fa089e9
parent9f583209f20a6eb0d959416010d07582a5014098
btrfs: hold a ref for the root in btrfs_find_orphan_roots

We lookup roots for every orphan item we have, we need to hold a ref on
the root while we're doing this work.

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/root-tree.c