[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200921071958.307589-1-hch@lst.de>
Date: Mon, 21 Sep 2020 09:19:44 +0200
From: Christoph Hellwig <hch@....de>
To: Jens Axboe <axboe@...nel.dk>
Cc: Josef Bacik <josef@...icpanda.com>,
Minchan Kim <minchan@...nel.org>,
Stefan Haberland <sth@...ux.ibm.com>,
Jan Hoeppner <hoeppner@...ux.ibm.com>,
Joseph Qi <joseph.qi@...ux.alibaba.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, nbd@...er.debian.org,
linux-ide@...r.kernel.org, linux-s390@...r.kernel.org,
linux-fsdevel@...r.kernel.org, ocfs2-devel@....oracle.com,
linux-pm@...r.kernel.org, linux-mm@...ck.org,
linux-block@...r.kernel.org
Subject: remove blkdev_get as a public API v2
Hi Jens,
this series removes blkdev_get as a public API, leaving it as just an
implementation detail of blkdev_get_by_path and blkdev_get_by_dev. The
reason for that is that blkdev_get is a very confusing API that requires
a struct block_device to be fed in, but then actually consumes the
reference. And it turns out just using the two above mentioned APIs
actually significantly simplifies the code as well.
Changes since v1:
- fix a mismerged that left a stray bdget_disk around
- factour the partition scan at registration time code into a new
helper.
Diffstat:
block/genhd.c | 35 ++++++---------
block/ioctl.c | 13 ++---
drivers/block/nbd.c | 8 +--
drivers/block/pktcdvd.c | 92 +++++-----------------------------------
drivers/block/zram/zram_drv.c | 7 +--
drivers/char/raw.c | 51 ++++++++--------------
drivers/ide/ide-gd.c | 2
drivers/s390/block/dasd_genhd.c | 15 +-----
fs/block_dev.c | 12 ++---
fs/ocfs2/cluster/heartbeat.c | 28 ++++--------
include/linux/blk_types.h | 4 -
include/linux/blkdev.h | 1
include/linux/genhd.h | 2
include/linux/suspend.h | 4 -
include/linux/swap.h | 3 -
kernel/power/swap.c | 21 +++------
kernel/power/user.c | 26 +++--------
mm/swapfile.c | 45 ++++++++++---------
18 files changed, 130 insertions(+), 239 deletions(-)
Powered by blists - more mailing lists