]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd5752f3fc398784d3f4d5a9b91ef235f6e74f417
tree75d291f37bf2628748596245c533d08ab206daba
parent304f810834fbd5e674b22366cb0a0bdb671d12d1
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