OSDN Git Service

btrfs: hold a ref on the root on the dead roots list
authorJosef Bacik <josef@toxicpanda.com>
Fri, 14 Feb 2020 21:11:44 +0000 (16:11 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:59 +0000 (17:01 +0100)
commitdc9492c14c758639d7b2468d4ed3c77e785c1a35
tree0e5ec0626b90f09250db0af571022b6e3c52f525
parent5c8fd99fec9d9265ed8fb732120a2ffd2bbab9b8
btrfs: hold a ref on the root on the dead roots list

At the point we add a root to the dead roots list we have no open inodes
for that root, so we need to hold a ref on that root to keep it from
disappearing.

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/transaction.c