diff options
author | Christoph Hellwig <hch@lst.de> | 2021-10-21 08:06:05 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-22 08:33:57 -0600 |
commit | 68ec3b819a5d600a4ede8b596761dccac9f39ebc (patch) | |
tree | 3c5e400ee170381870fd834cada2f60c5d795302 /drivers/scsi/sr.c | |
parent | 237ea1602fb4cd14cd31b745a56fd0639c58eea3 (diff) | |
download | linux-68ec3b819a5d600a4ede8b596761dccac9f39ebc.tar.gz linux-68ec3b819a5d600a4ede8b596761dccac9f39ebc.tar.bz2 linux-68ec3b819a5d600a4ede8b596761dccac9f39ebc.zip |
scsi: add a scsi_alloc_request helper
Add a new helper that calls blk_get_request and initializes the
scsi_request to avoid the indirect call through ->.initialize_rq_fn.
Note that this makes the pktcdvd driver depend on the SCSI core, but
given that only SCSI devices support SCSI passthrough requests that
is not a functional change.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20211021060607.264371-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 115f7ef7a5de..7c4d9a964799 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -967,7 +967,7 @@ static int sr_read_cdda_bpc(struct cdrom_device_info *cdi, void __user *ubuf, struct bio *bio; int ret; - rq = blk_get_request(disk->queue, REQ_OP_DRV_IN, 0); + rq = scsi_alloc_request(disk->queue, REQ_OP_DRV_IN, 0); if (IS_ERR(rq)) return PTR_ERR(rq); req = scsi_req(rq); |