Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be948fc3 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley
Browse files

[SCSI] libfc: call fc_remote_port_chkready under the host lock.



The rport port state and flags are set under the host lock,
so this patch calls fc_remote_port_chkready with the host lock
held like is also done in the other fc drivers.

Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 26845f58
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1765,14 +1765,14 @@ int fc_queuecommand(struct scsi_cmnd *sc_cmd, void (*done)(struct scsi_cmnd *))
	struct fcoe_dev_stats *stats;

	lport = shost_priv(sc_cmd->device->host);
	spin_unlock_irq(lport->host->host_lock);

	rval = fc_remote_port_chkready(rport);
	if (rval) {
		sc_cmd->result = rval;
		done(sc_cmd);
		goto out;
		return 0;
	}
	spin_unlock_irq(lport->host->host_lock);

	if (!*(struct fc_remote_port **)rport->dd_data) {
		/*