Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: scsi_transport_fc: Use scsi_cmd_to_rq() instead of scsi_cmnd.request

Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.

Link: https://lore.kernel.org/r/20210809230355.8186-6-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
3b4720fc c4deb5b5

+1 -1
+1 -1
drivers/scsi/scsi_transport_fc.c
··· 3804 3804 struct fc_rport *rport = starget_to_rport(scsi_target(scmd->device)); 3805 3805 3806 3806 if ((rport->port_state != FC_PORTSTATE_ONLINE) && 3807 - (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT)) { 3807 + (scsi_cmd_to_rq(scmd)->cmd_flags & REQ_FAILFAST_TRANSPORT)) { 3808 3808 set_host_byte(scmd, DID_TRANSPORT_MARGINAL); 3809 3809 return false; 3810 3810 }