remove blkdev_get as a public API

From: Christoph Hellwig
Date: Thu Sep 17 2020 - 13:00:59 EST


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.

Diffstat:
block/genhd.c | 11 ++--
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 | 13 +----
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, 119 insertions(+), 224 deletions(-)