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>
        struct fc_rport *rport = starget_to_rport(scsi_target(scmd->device));
 
        if ((rport->port_state != FC_PORTSTATE_ONLINE) &&
-               (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT)) {
+               (scsi_cmd_to_rq(scmd)->cmd_flags & REQ_FAILFAST_TRANSPORT)) {
                set_host_byte(scmd, DID_TRANSPORT_MARGINAL);
                return false;
        }