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/scsi_bsg.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/scsi_bsg.c')
-rw-r--r-- | drivers/scsi/scsi_bsg.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_bsg.c b/drivers/scsi/scsi_bsg.c index f8b65bd75ee1..0a6f6140501b 100644 --- a/drivers/scsi/scsi_bsg.c +++ b/drivers/scsi/scsi_bsg.c @@ -76,11 +76,12 @@ static int scsi_bsg_sg_io_fn(struct request_queue *q, struct sg_io_v4 *hdr, hdr->info |= SG_INFO_CHECK; hdr->response_len = 0; - if (sreq->sense_len && hdr->response) { + if (scmd->sense_len && hdr->response) { int len = min_t(unsigned int, hdr->max_response_len, - sreq->sense_len); + scmd->sense_len); - if (copy_to_user(uptr64(hdr->response), sreq->sense, len)) + if (copy_to_user(uptr64(hdr->response), scmd->sense_buffer, + len)) ret = -EFAULT; else hdr->response_len = len; |