diff options
author | Lu Fengqi <lufq.fnst@cn.fujitsu.com> | 2018-08-09 09:46:04 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-23 17:37:26 +0200 |
commit | a5b7f4295eeae8b05ca91f6d145cd8773b08de9e (patch) | |
tree | 34d2cb5ef46a2c16c6673010f200d17fbd5fd732 /fs/btrfs/ctree.c | |
parent | de02b9f6bb65a6a1848f346f7a3617b7a9b930c0 (diff) | |
download | linux-a5b7f4295eeae8b05ca91f6d145cd8773b08de9e.tar.bz2 |
btrfs: fix qgroup_free wrong num_bytes in btrfs_subvolume_reserve_metadata
After btrfs_qgroup_reserve_meta_prealloc(), num_bytes will be assigned
again by btrfs_calc_trans_metadata_size(). Once block_rsv fails, we
can't properly free the num_bytes of the previous qgroup_reserve. Use a
separate variable to store the num_bytes of the qgroup_reserve.
Delete the comment for the qgroup_reserved that does not exist and add a
comment about use_global_rsv.
Fixes: c4c129db5da8 ("btrfs: drop unused parameter qgroup_reserved")
CC: stable@vger.kernel.org # 4.18+
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
0 files changed, 0 insertions, 0 deletions