Skip to content

Commit

Permalink
[SCSI] libfc: call fc_remote_port_chkready under the host lock.
Browse files Browse the repository at this point in the history
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: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Mike Christie authored and James Bottomley committed Aug 6, 2010
1 parent 26845f5 commit be948fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/libfc/fc_fcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
/*
Expand Down

0 comments on commit be948fc

Please sign in to comment.