btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Mon, 27 Feb 2017 07:10:35 +0000 (15:10 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 29 Jun 2017 18:17:02 +0000 (20:17 +0200)
commitd1b8b94a2b4f416b416bdfde46315e9aef17f358
tree271e0e92eea260df6b2cb01f45eba3895419b898
parent5edfd9fdc644bf426a8bf9192d9c1a3680d75862
btrfs: qgroup: Cleanup btrfs_qgroup_prepare_account_extents function

Quite a lot of qgroup corruption happens due to wrong time of calling
btrfs_qgroup_prepare_account_extents().

Since the safest time is to call it just before
btrfs_qgroup_account_extents(), there is no need to separate these 2
functions.

Merging them will make code cleaner and less bug prone.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
[ changelog and comment adjustments ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/qgroup.c
fs/btrfs/qgroup.h
fs/btrfs/transaction.c