diff options
author | Christoph Hellwig <hch@lst.de> | 2022-02-24 18:55:50 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-03-02 04:21:50 +0100 |
commit | dbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4 (patch) | |
tree | 631497936089e518bac20582f2b7803a88d478ef /drivers/scsi/scsi_ioctl.c | |
parent | scsi: core: Move the resid_len field from struct scsi_request to struct scsi_... (diff) | |
download | linux-dbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4.tar.xz linux-dbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4.zip |
scsi: core: Move the result field from struct scsi_request to struct scsi_cmnd
Prepare for removing the scsi_request structure by moving the result field
to struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220224175552.988286-7-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_ioctl.c')
-rw-r--r-- | drivers/scsi/scsi_ioctl.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index b066fdd6305a..04b7c70d1dba 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c @@ -370,16 +370,15 @@ static int scsi_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr, struct bio *bio) { struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(rq); - struct scsi_request *req = scsi_req(rq); int r, ret = 0; /* * fill in all the output members */ - hdr->status = req->result & 0xff; - hdr->masked_status = status_byte(req->result); + hdr->status = scmd->result & 0xff; + hdr->masked_status = status_byte(scmd->result); hdr->msg_status = COMMAND_COMPLETE; - hdr->host_status = host_byte(req->result); + hdr->host_status = host_byte(scmd->result); hdr->driver_status = 0; if (scsi_status_is_check_condition(hdr->status)) hdr->driver_status = DRIVER_SENSE; @@ -611,7 +610,7 @@ static int sg_scsi_ioctl(struct request_queue *q, fmode_t mode, blk_execute_rq(rq, false); - err = req->result & 0xff; /* only 8 bit SCSI status */ + err = scmd->result & 0xff; /* only 8 bit SCSI status */ if (err) { if (scmd->sense_len && scmd->sense_buffer) { /* limit sense len for backward compatibility */ |