Btrfs: don't call btrfs_qgroup_free if just btrfs_qgroup_reserve fails
authorWang Shilong <wangsl-fnst@cn.fujitsu.com>
Fri, 1 Mar 2013 11:33:01 +0000 (11:33 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Fri, 1 Mar 2013 15:13:04 +0000 (10:13 -0500)
commita9870c0e031527fbfa382019f30d2e9b98124a0d
tree5c59752af695a18db6b8c421199424423364b73b
parent235fdb8ef2a313749cf3a42e70156c618263a388
Btrfs: don't call btrfs_qgroup_free if just btrfs_qgroup_reserve fails

commit eb6b88d92c6df083dd09a8c471011e3788dfd7c6 leads into another bug.
If it is just because qgroup_reserve fails, the function btrfs_qgroup_free
should not be called, otherwise, it will cause the wrong quota accounting.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent-tree.c