Re: [PATCH 0/4] introduce new put_getdisk() call

From: Tejun Heo
Date: Mon Feb 01 2016 - 12:16:50 EST


On Mon, Feb 01, 2016 at 03:51:51PM +0100, Roman Pen wrote:
> Hello.
>
> In this patchset in the first patch I fixed module reference leak inside
> blk-cgroup.c. In other patches I switched to a new put_getdisk() call,
> which should be used if the disk was received by get_disk() or get_gendisk()
> functions, which internally increase module reference.
>
> The idea is to avoid confusion in the future and to have symmetric calls:
>
> alloc_disk() -> put_disk() [as it is done in all the block drivers]
>
> and
>
> get_gendisk() -> put_gendisk() [if you need to find a disk by minor,major]
>
> The second sequence internally increases disk owner module reference on
> get and decreases it on put.

For the entire series,

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Nice catch, thanks!

--
tejun