aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-26 10:41:07 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-01 14:53:40 -0700
commit977115c0f664e016a6b2774d4f97116ade23d732 (patch)
tree1fec5aa76caa573bdc71d4731aa5b18b959a3aa3 /drivers/s390
parentblock: merge struct block_device and struct hd_struct (diff)
downloadlinux-dev-977115c0f664e016a6b2774d4f97116ade23d732.tar.xz
linux-dev-977115c0f664e016a6b2774d4f97116ade23d732.zip
block: stop using bdget_disk for partition 0
We can just dereference the point in struct gendisk instead. Also remove the now unused export. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd_ioctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index 304eba1acf16..9f6424408946 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -220,9 +220,8 @@ dasd_format(struct dasd_block *block, struct format_data_t *fdata)
* enabling the device later.
*/
if (fdata->start_unit == 0) {
- struct block_device *bdev = bdget_disk(block->gdp, 0);
- bdev->bd_inode->i_blkbits = blksize_bits(fdata->blksize);
- bdput(bdev);
+ block->gdp->part0->bd_inode->i_blkbits =
+ blksize_bits(fdata->blksize);
}
rc = base->discipline->format_device(base, fdata, 1);