Bart Van Assche bed2213d01 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>
2017-08-25 17:08:07 -04:00
..
2012-02-19 08:08:58 -06:00
2016-07-20 19:49:41 -04:00
2016-01-27 20:36:10 +08:00
2017-05-04 12:19:44 -07:00
2015-12-02 16:36:14 -05:00
2016-02-23 21:27:02 -05:00
2017-02-21 11:51:42 -08:00
2017-04-11 20:55:20 -04:00
2015-05-18 13:35:56 -04:00