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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Gi-Oh Kim <gi-oh.kim@xxxxxxxxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Len Brown <len.brown@xxxxxxxxx>
Cc: Ming Lei <tom.leiming@xxxxxxxxx>
Cc: Pavel Machek <pavel@xxxxxx>
Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Vishal Verma <vishal.l.verma@xxxxxxxxx>
Cc: linux-block@xxxxxxxxxxxxxxx
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-pm@xxxxxxxxxxxxxxx

-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux