diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-02-20 09:16:39 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-20 13:00:09 -0500 |
commit | 272d26d0ad8c0e326689f2fa3cdc6a5fcc8e74e0 (patch) | |
tree | 52dfc880b2025ea738940ec8ebecfaaf839aba13 /fs/btrfs/transaction.c | |
parent | 683cebda90787730d5260eac0da7c2bff9fb40ef (diff) |
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 <miaox@cn.fujitsu.com>
Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Cc: Arne Jansen <sensille@gmx.net>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index c1ce664c0c39..955204ca0447 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -1553,6 +1553,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
1553 | 1553 | ||
1554 | btrfs_trans_release_metadata(trans, root); | 1554 | btrfs_trans_release_metadata(trans, root); |
1555 | trans->block_rsv = NULL; | 1555 | trans->block_rsv = NULL; |
1556 | if (trans->qgroup_reserved) { | ||
1557 | btrfs_qgroup_free(root, trans->qgroup_reserved); | ||
1558 | trans->qgroup_reserved = 0; | ||
1559 | } | ||
1556 | 1560 | ||
1557 | cur_trans = trans->transaction; | 1561 | cur_trans = trans->transaction; |
1558 | 1562 | ||
@@ -1833,6 +1837,10 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
1833 | cleanup_transaction: | 1837 | cleanup_transaction: |
1834 | btrfs_trans_release_metadata(trans, root); | 1838 | btrfs_trans_release_metadata(trans, root); |
1835 | trans->block_rsv = NULL; | 1839 | trans->block_rsv = NULL; |
1840 | if (trans->qgroup_reserved) { | ||
1841 | btrfs_qgroup_free(root, trans->qgroup_reserved); | ||
1842 | trans->qgroup_reserved = 0; | ||
1843 | } | ||
1836 | btrfs_printk(root->fs_info, "Skipping commit of aborted transaction.\n"); | 1844 | btrfs_printk(root->fs_info, "Skipping commit of aborted transaction.\n"); |
1837 | // WARN_ON(1); | 1845 | // WARN_ON(1); |
1838 | if (current->journal_info == trans) | 1846 | if (current->journal_info == trans) |