summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorBart Van Assche2017-08-25 22:46:32 +0200
committerMartin K. Petersen2017-08-25 23:08:07 +0200
commitbed2213d01de474eb8a6f3891070eec6be6fe772 (patch)
tree7cf1ff22eb30ec502abf3f5155cb04ef64d9a72c /drivers/scsi/sd.c
parentscsi: Document which queue type a function is intended for (diff)
downloadkernel-qcow2-linux-bed2213d01de474eb8a6f3891070eec6be6fe772.tar.gz
kernel-qcow2-linux-bed2213d01de474eb8a6f3891070eec6be6fe772.tar.xz
kernel-qcow2-linux-bed2213d01de474eb8a6f3891070eec6be6fe772.zip
scsi: Use blk_mq_rq_to_pdu() to convert a request to a SCSI command pointer
Since commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as part of struct request") struct request and struct scsi_cmnd are adjacent. This means that there is now an alternative to reading req->special to convert a pointer to a prepared request into a SCSI command pointer, namely by using blk_mq_rq_to_pdu(). Make this change where appropriate. Although this patch does not change any functionality, it slightly improves performance and slightly improves readability. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.c')
0 files changed, 0 insertions, 0 deletions