]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:15 +0000 (10:50 +0200)
commit823777b798a9e7e07c841c407cfe808322f002b3
tree0f962ce94f524c9f403492777f9dd85923c618a9
parent1b3a2dafaf9c6376c7ac9162ba164092c47f66a4
btrfs: reloc: clean dirty subvols if we fail to start a transaction

commit 0fc1cb61da2ed3d19f1021940f8eb19ed4dbf174 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/relocation.c