diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-02-14 16:11:44 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 17:01:59 +0100 |
commit | dc9492c14c758639d7b2468d4ed3c77e785c1a35 (patch) | |
tree | 0e5ec0626b90f09250db0af571022b6e3c52f525 /fs/btrfs/disk-io.c | |
parent | 5c8fd99fec9d9265ed8fb732120a2ffd2bbab9b8 (diff) | |
download | linux-dc9492c14c758639d7b2468d4ed3c77e785c1a35.tar.bz2 |
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>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 5db76264b07f..831755a867ce 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2035,8 +2035,7 @@ void btrfs_free_fs_roots(struct btrfs_fs_info *fs_info) if (test_bit(BTRFS_ROOT_IN_RADIX, &gang[0]->state)) btrfs_drop_and_free_fs_root(fs_info, gang[0]); - else - btrfs_put_root(gang[0]); + btrfs_put_root(gang[0]); } while (1) { |