diff options
author | Christoph Hellwig <hch@lst.de> | 2022-02-24 18:55:51 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-03-01 22:21:50 -0500 |
commit | 6aded12b10e0c9536ee2c8ee33a1f7ed52f9cb34 (patch) | |
tree | 1174a1b6a77638b424e579ad16b3c75d2a500e75 /drivers/scsi/scsi_error.c | |
parent | dbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4 (diff) | |
download | linux-6aded12b10e0c9536ee2c8ee33a1f7ed52f9cb34.tar.gz |
scsi: core: Remove struct scsi_request
Let submitters initialize the scmd->allowed field directly instead of
indirecting through struct scsi_request and remove the now superfluous
structure.
Link: https://lore.kernel.org/r/20220224175552.988286-8-hch@lst.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index cf02d1c50389..9c237b223e63 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2023,12 +2023,10 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) { struct scsi_cmnd *scmd; struct request *req; - struct scsi_request *rq; req = scsi_alloc_request(sdev->request_queue, REQ_OP_DRV_IN, 0); if (IS_ERR(req)) return; - rq = scsi_req(req); scmd = blk_mq_rq_to_pdu(req); scmd->cmnd[0] = ALLOW_MEDIUM_REMOVAL; @@ -2041,7 +2039,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) req->rq_flags |= RQF_QUIET; req->timeout = 10 * HZ; - rq->retries = 5; + scmd->allowed = 5; blk_execute_rq_nowait(req, true, eh_lock_door_done); } |