btrfs: reloc: clean dirty subvols if we fail to start a transaction
authorJosef Bacik <josef@toxicpanda.com>
Wed, 4 Mar 2020 16:18:27 +0000 (11:18 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:57 +0000 (17:01 +0100)
commit6217b0fadd4473a16fabc6aecd7527a9f71af534
tree75d291f37bf2628748596245c533d08ab206daba
parentfb2d83eefef4e1c717205bac71cb1941edf8ae11
btrfs: reloc: clean dirty subvols if we fail to start a transaction

If we do merge_reloc_roots() we could insert a few roots onto the dirty
subvol roots list, where we hold a ref on them.  If we fail to start the
transaction we need to run clean_dirty_subvols() in order to cleanup the
refs.

CC: stable@vger.kernel.org # 5.4+
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