OSDN Git Service

btrfs: hold a ref on the root in btrfs_recover_relocation
authorJosef Bacik <josef@toxicpanda.com>
Fri, 24 Jan 2020 14:32:44 +0000 (09:32 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:30 +0000 (17:01 +0100)
commit932fd26df8125a5b14438563c4d3e33f59ba80f7
treef7176c228f6fb3ddc6ef02287f33ce0e6e5e8dc3
parent76deacf02387f0cd5b6125fb54caaabe595ffc17
btrfs: hold a ref on the root in btrfs_recover_relocation

We look up the fs root in various places in here when recovering from a
crashed relcoation.  Make sure we hold a ref on the root whenever we
look them up.

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