From: Miao Xie Date: Wed, 20 Feb 2013 14:16:39 +0000 (+0000) Subject: Btrfs: fix missing release of qgroup reservation in commit_transaction() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=272d26d0ad8c0e326689f2fa3cdc6a5fcc8e74e0;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Btrfs: fix missing release of qgroup reservation in commit_transaction() We forget to free qgroup reservation in commit_transaction(),fix it. Signed-off-by: Miao Xie Signed-off-by: Wang Shilong Cc: Arne Jansen Signed-off-by: Josef Bacik --- diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index c1ce664c0c3..955204ca044 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1553,6 +1553,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, btrfs_trans_release_metadata(trans, root); trans->block_rsv = NULL; + if (trans->qgroup_reserved) { + btrfs_qgroup_free(root, trans->qgroup_reserved); + trans->qgroup_reserved = 0; + } cur_trans = trans->transaction; @@ -1833,6 +1837,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, cleanup_transaction: btrfs_trans_release_metadata(trans, root); trans->block_rsv = NULL; + if (trans->qgroup_reserved) { + btrfs_qgroup_free(root, trans->qgroup_reserved); + trans->qgroup_reserved = 0; + } btrfs_printk(root->fs_info, "Skipping commit of aborted transaction.\n"); // WARN_ON(1); if (current->journal_info == trans)