summaryrefslogtreecommitdiff
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-08-25 23:46:32 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-26 00:08:07 +0300
commitbed2213d01de474eb8a6f3891070eec6be6fe772 (patch)
tree7cf1ff22eb30ec502abf3f5155cb04ef64d9a72c /drivers/scsi/sd.c
parente7008ff5c61a13e673344d3048baaf8e0652fa87 (diff)
downloadlinux-bed2213d01de474eb8a6f3891070eec6be6fe772.tar.xz
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