aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZiyang Zhang <[email protected]>2023-02-07 15:08:39 +0800
committerJens Axboe <[email protected]>2023-02-07 07:21:31 -0700
commit1972d038a5401781377d3ce2d901bf7763a43589 (patch)
tree7ed2cca44a2cbcf2a44ab48bb2aa4eea34ffac99
parentb352389e7ba34bdb5bcf4254fa1e85319ba76352 (diff)
ublk: pass NULL to blk_mq_alloc_disk() as queuedata
queuedata is not referenced in ublk_drv and we can use driver_data instead. Pass NULL to blk_mq_alloc_disk() as queuedata while allocating ublk's gendisk. Signed-off-by: Ziyang Zhang <[email protected]> Reviewed-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--drivers/block/ublk_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 06eddefdf02a..d83fe2c2b3ba 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -1578,7 +1578,7 @@ static int ublk_ctrl_start_dev(struct ublk_device *ub, struct io_uring_cmd *cmd)
goto out_unlock;
}
- disk = blk_mq_alloc_disk(&ub->tag_set, ub);
+ disk = blk_mq_alloc_disk(&ub->tag_set, NULL);
if (IS_ERR(disk)) {
ret = PTR_ERR(disk);
goto out_unlock;