Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 272d26d0 authored by Miao Xie's avatar Miao Xie Committed by Josef Bacik
Browse files

Btrfs: fix missing release of qgroup reservation in commit_transaction()



We forget to free qgroup reservation in commit_transaction(),fix it.

Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarWang Shilong <wangsl-fnst@cn.fujitsu.com>
Cc: Arne Jansen <sensille@gmx.net>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent 683cebda
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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)