OSDN Git Service

btrfs: hold a ref on fs roots while they're in the radix tree
authorJosef Bacik <josef@toxicpanda.com>
Fri, 24 Jan 2020 14:32:27 +0000 (09:32 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:27 +0000 (17:01 +0100)
commitaf01d2e53f3343e9f22495e79f07b107374b05a1
tree536bc29e694aaebb846ee24f22992661eb54f54a
parent4b8b05288835501012d957bee597bffc72512646
btrfs: hold a ref on fs roots while they're in the radix tree

If the root is sitting in the radix tree, we should probably have a ref
for the radix tree.  Grab a ref on the root when we insert it, and drop
it when it gets deleted.

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