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. Roman Pen (4): block: fix module reference leak on put_disk() call for cgroups throttle block: introduce new call put_gendisk() in genhd.c block,fs: switch to a new put_gendisk() call hibernate: fix disk and module leak on successfull resume block/blk-cgroup.c | 6 ++--- block/genhd.c | 59 +++++++++++++++++++++++++++++++++++++++++++++--- fs/block_dev.c | 24 ++++++-------------- include/linux/genhd.h | 1 + kernel/power/hibernate.c | 5 +++- 5 files changed, 71 insertions(+), 24 deletions(-) Cc: "Martin K. Petersen" <martin.peter...@oracle.com> Cc: "Rafael J. Wysocki" <r...@rjwysocki.net> Cc: Alexander Viro <v...@zeniv.linux.org.uk> Cc: Dan Williams <dan.j.willi...@intel.com> Cc: Gi-Oh Kim <gi-oh....@profitbricks.com> Cc: Jens Axboe <ax...@kernel.dk> Cc: Len Brown <len.br...@intel.com> Cc: Ming Lei <tom.leim...@gmail.com> Cc: Pavel Machek <pa...@ucw.cz> Cc: Sagi Grimberg <sa...@mellanox.com> Cc: Tejun Heo <t...@kernel.org> Cc: Vishal Verma <vishal.l.ve...@intel.com> Cc: linux-bl...@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux...@vger.kernel.org -- 2.6.2