linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Pen <roman.penyaev@profitbricks.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Roman Pen <roman.penyaev@profitbricks.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Dan Williams <dan.j.williams@intel.com>,
	Gi-Oh Kim <gi-oh.kim@profitbricks.com>,
	Jens Axboe <axboe@kernel.dk>, Len Brown <len.brown@intel.com>,
	Ming Lei <tom.leiming@gmail.com>, Pavel Machek <pavel@ucw.cz>,
	Sagi Grimberg <sagig@mellanox.com>, Tejun Heo <tj@kernel.org>,
	Vishal Verma <vishal.l.verma@intel.com>,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: [PATCH 0/4] introduce new put_getdisk() call
Date: Mon,  1 Feb 2016 15:51:51 +0100	[thread overview]
Message-ID: <1454338315-13465-1-git-send-email-roman.penyaev@profitbricks.com> (raw)

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

             reply	other threads:[~2016-02-01 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 14:51 Roman Pen [this message]
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-03  1:37   ` Rafael J. Wysocki
2016-02-01 17:16 ` [PATCH 0/4] introduce new put_getdisk() call Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454338315-13465-1-git-send-email-roman.penyaev@profitbricks.com \
    --to=roman.penyaev@profitbricks.com \
    --cc=axboe@kernel.dk \
    --cc=dan.j.williams@intel.com \
    --cc=gi-oh.kim@profitbricks.com \
    --cc=len.brown@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 \
    --cc=martin.petersen@oracle.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=sagig@mellanox.com \
    --cc=tj@kernel.org \
    --cc=tom.leiming@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).