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/target | |
parent | ce70fd9a551af7424a7dace2a1ba05a7de8eae27 (diff) | |
download | linux-5b794f98074a8b7e8eb77dd43746062940b51160.tar.gz linux-5b794f98074a8b7e8eb77dd43746062940b51160.tar.bz2 linux-5b794f98074a8b7e8eb77dd43746062940b51160.zip |
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/target')
-rw-r--r-- | drivers/target/target_core_pscsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 0a8078db923d..9146193d0576 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -1031,6 +1031,7 @@ static sector_t pscsi_get_blocks(struct se_device *dev) static void pscsi_req_done(struct request *req, blk_status_t status) { struct se_cmd *cmd = req->end_io_data; + struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(req); int result = scsi_req(req)->result; enum sam_status scsi_status = result & 0xff; u8 *cdb = cmd->priv; @@ -1040,7 +1041,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status) " 0x%02x Result: 0x%08x\n", cmd, cdb[0], result); } - pscsi_complete_cmd(cmd, scsi_status, scsi_req(req)->sense); + pscsi_complete_cmd(cmd, scsi_status, scmd->sense_buffer); switch (host_byte(result)) { case DID_OK: |