diff options
author | Christoph Hellwig <hch@lst.de> | 2022-02-24 18:55:48 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-03-01 22:21:49 -0500 |
commit | 5b794f98074a8b7e8eb77dd43746062940b51160 (patch) | |
tree | 0d9fb15f5afe36a628a7770de661d5355ea50af2 /drivers/scsi/st.c | |
parent | ce70fd9a551af7424a7dace2a1ba05a7de8eae27 (diff) | |
download | linux-5b794f98074a8b7e8eb77dd43746062940b51160.tar.bz2 |
scsi: core: Remove the sense and sense_len fields from struct scsi_request
Just use the sense_buffer field in struct scsi_cmnd for the sense data and
move the sense_len field over to struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220224175552.988286-5-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/st.c')
-rw-r--r-- | drivers/scsi/st.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 229e819a1797..9b98e848d78c 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -514,6 +514,7 @@ static void st_do_stats(struct scsi_tape *STp, struct request *req) static void st_scsi_execute_end(struct request *req, blk_status_t status) { + struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(req); struct st_request *SRpnt = req->end_io_data; struct scsi_request *rq = scsi_req(req); struct scsi_tape *STp = SRpnt->stp; @@ -525,8 +526,8 @@ static void st_scsi_execute_end(struct request *req, blk_status_t status) st_do_stats(STp, req); tmp = SRpnt->bio; - if (rq->sense_len) - memcpy(SRpnt->sense, rq->sense, SCSI_SENSE_BUFFERSIZE); + if (scmd->sense_len) + memcpy(SRpnt->sense, scmd->sense_buffer, SCSI_SENSE_BUFFERSIZE); if (SRpnt->waiting) complete(SRpnt->waiting); |