On 3.06.20 г. 13:10 ч., Anand Jain wrote: > The name 'count' is a very commonly used name. It is often difficult to > review the code to check if there is any leak. So rename it to > 'bg_count', which is unique enough. > > This patch also serves as a preparatory patch to either make sure > btrfs_get_block_group() is used instead of open coded the same or just > open code every where as btrfs_get_block_group() is a one-liner. > > Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx> This introduces unnecessary churn, instead if all uses happen through the btrfs_get_block_group/put apis you can simply grep for those. All other uses are RO. Also bg_count is not very descriptive given this is really a refcount. Open-coding probably would be fine if this type is switched to refcount_t rather than an atomic_t.
