summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorBoris Burkov <boris@bur.io>2023-12-01 13:00:11 -0800
committerDavid Sterba <dsterba@suse.com>2023-12-06 22:32:49 +0100
commitb321a52cce062ec7ed385333a33905d22159ce36 (patch)
tree86ae2827e657bf7c8d0b9d61cf96059341d2a767 /fs/btrfs/transaction.c
parent9e65bfca24cf1d77e4a5c7a170db5867377b3fe7 (diff)
downloadlinux-b321a52cce062ec7ed385333a33905d22159ce36.tar.gz
linux-b321a52cce062ec7ed385333a33905d22159ce36.tar.bz2
linux-b321a52cce062ec7ed385333a33905d22159ce36.zip
btrfs: free qgroup pertrans reserve on transaction abort
If we abort a transaction, we never run the code that frees the pertrans qgroup reservation. This results in warnings on unmount as that reservation has been leaked. The leak isn't a huge issue since the fs is read-only, but it's better to clean it up when we know we can/should. Do it during the cleanup_transaction step of aborting. CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Boris Burkov <boris@bur.io> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 7af9665bebae..b5aa83b7345a 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -37,8 +37,6 @@
static struct kmem_cache *btrfs_trans_handle_cachep;
-#define BTRFS_ROOT_TRANS_TAG 0
-
/*
* Transaction states and transitions
*