summaryrefslogtreecommitdiff
path: root/block/partitions/atari.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-10 18:45:09 +0300
committerJens Axboe <axboe@kernel.dk>2021-08-12 19:31:35 +0300
commita08aa9bccdc282b5e8d133bf8c239473f057b464 (patch)
treebacbfd0d8f42786aed2fff06103c78aa3a98b3df /block/partitions/atari.c
parent50b4aecfbbb09869db967e4a26212a47e10c0088 (diff)
downloadlinux-a08aa9bccdc282b5e8d133bf8c239473f057b464.tar.xz
block: store a gendisk in struct parsed_partitions
Partition scanning only happens on the whole device, so pass a struct gendisk instead of the whole device block_device to the scanners. This allows to simplify printing the device name in various places as the disk name is available in disk->name. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Link: https://lore.kernel.org/r/20210810154512.1809898-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/partitions/atari.c')
-rw-r--r--block/partitions/atari.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/partitions/atari.c b/block/partitions/atari.c
index 2305840c8522..da5994175416 100644
--- a/block/partitions/atari.c
+++ b/block/partitions/atari.c
@@ -47,7 +47,7 @@ int atari_partition(struct parsed_partitions *state)
* ATARI partition scheme supports 512 lba only. If this is not
* the case, bail early to avoid miscalculating hd_size.
*/
- if (bdev_logical_block_size(state->bdev) != 512)
+ if (queue_logical_block_size(state->disk->queue) != 512)
return 0;
rs = read_part_sector(state, 0, &sect);
@@ -55,7 +55,7 @@ int atari_partition(struct parsed_partitions *state)
return -1;
/* Verify this is an Atari rootsector: */
- hd_size = state->bdev->bd_inode->i_size >> 9;
+ hd_size = get_capacity(state->disk);
if (!VALID_PARTITION(&rs->part[0], hd_size) &&
!VALID_PARTITION(&rs->part[1], hd_size) &&
!VALID_PARTITION(&rs->part[2], hd_size) &&