On Sun, May 27, 2018 at 09:25:25AM +0800, Qu Wenruo wrote:
> 
> 
> On 2018年05月22日 20:14, David Sterba wrote:
> > On Tue, May 22, 2018 at 04:43:47PM +0800, Qu Wenruo wrote:
> >> Introduce a small helper, btrfs_mark_bg_unused(), to accquire needed
> >> locks and add a block group to unused_bgs list.
> > 
> > The helper is nice but hides that there's a reference taken on the 'bg'.
> > This would be good to add at least to the function comment or somehow
> > squeeze it into the function name itself, like
> > btrfs_get_and_mark_bg_unused.
> 
> That btrfs_get_block_group() call is only for later removal.
> The reference will be removed in btrfs_delete_unused_bgs().
> 
> So I don't think the function name needs the "_get" part.

Agreed, it's inside the helpers. Patch added to misc-next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to