summaryrefslogtreecommitdiff
path: root/block/partitions
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-24 09:17:46 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-01 14:53:40 -0700
commit9fc995a6e08349b5c5baff2cc31544b96ee2b1c3 (patch)
tree98284848498e8ef95e5f9e9ad2f7f11ba6eb1a61 /block/partitions
parent41e5c81984eac8ce87f2b4f57fec0bd90a049b2b (diff)
block: pass a block_device to blk_alloc_devt
Pass the block_device actually needed instead of the hd_struct. 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 'block/partitions')
-rw-r--r--block/partitions/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c
index 6db9ca8b722d..3d8243334c7c 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -392,7 +392,7 @@ static struct hd_struct *add_partition(struct gendisk *disk, int partno,
pdev->type = &part_type;
pdev->parent = ddev;
- err = blk_alloc_devt(p, &devt);
+ err = blk_alloc_devt(bdev, &devt);
if (err)
goto out_bdput;
pdev->devt = devt;