btrfs: don't get an EINTR during drop_snapshot for reloc
authorJosef Bacik <josef@toxicpanda.com>
Wed, 16 Dec 2020 16:22:05 +0000 (11:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:54:52 +0000 (11:54 +0100)
commit9e2fc8f10c9175e7f5d4bd636036ef427bb3eae9
treed3b610afcc9ed4687a560f8041843d42782c3800
parentd9deb4ccd026cb6b4a8424a316b829b567bde3d7
btrfs: don't get an EINTR during drop_snapshot for reloc

commit 18d3bff411c8d46d40537483bdc0b61b33ce0371 upstream.

This was partially fixed by f3e3d9cc3525 ("btrfs: avoid possible signal
interruption of btrfs_drop_snapshot() on relocation tree"), however it
missed a spot when we restart a trans handle because we need to end the
transaction.  The fix is the same, simply use btrfs_join_transaction()
instead of btrfs_start_transaction() when deleting reloc roots.

Fixes: f3e3d9cc3525 ("btrfs: avoid possible signal interruption of btrfs_drop_snapshot() on relocation tree")
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/extent-tree.c