]> 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)
commit0fc1cb61da2ed3d19f1021940f8eb19ed4dbf174
tree75d291f37bf2628748596245c533d08ab206daba
parent974f7bc84693a793b5f7f1b340b4b15fd377a2e4
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