All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] introduce new put_getdisk() call
@ 2016-02-01 14:51 ` Roman Pen
  0 siblings, 0 replies; 10+ messages in thread
From: Roman Pen @ 2016-02-01 14:51 UTC (permalink / raw)
  Cc: Roman Pen, Martin K. Petersen, Rafael J. Wysocki, Alexander Viro,
	Dan Williams, Gi-Oh Kim, Jens Axboe, Len Brown, Ming Lei,
	Pavel Machek, Sagi Grimberg, Tejun Heo, Vishal Verma,
	linux-block, linux-fsdevel, linux-kernel, linux-pm

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.petersen@oracle.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Gi-Oh Kim <gi-oh.kim@profitbricks.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Len Brown <len.brown@intel.com>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: linux-block@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org

-- 
2.6.2

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-03 10:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 14:51 [PATCH 0/4] introduce new put_getdisk() call Roman Pen
2016-02-01 14:51 ` Roman Pen
2016-02-01 14:51 ` [PATCH 1/4] block: fix module reference leak on put_disk() call for cgroups throttle Roman Pen
2016-02-03 10:40   ` Gi-Oh Kim
2016-02-01 14:51 ` [PATCH 2/4] block: introduce new call put_gendisk() in genhd.c Roman Pen
2016-02-01 14:51 ` [PATCH 3/4] block,fs: switch to a new put_gendisk() call Roman Pen
2016-02-01 14:51 ` [PATCH 4/4] hibernate: fix disk and module leak on successfull resume Roman Pen
2016-02-01 14:51   ` Roman Pen
2016-02-03  1:37   ` Rafael J. Wysocki
2016-02-01 17:16 ` [PATCH 0/4] introduce new put_getdisk() call Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.