aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-02-08 18:49:26 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-11 18:52:57 -0500
commite47c9093531d3406a8ae38acca4ce207ef70cc0e (patch)
treecb115ec0b7981a100ef39ecfc68a36aa7e3e0f2e /drivers/scsi/lpfc/lpfc_attr.c
parent4660c8ed5aaed99d82785499f034a8cc9199866d (diff)
[SCSI] lpfc 8.2.5 : Correct ndlp referencing issues
Correct ndlp referencing issues: - Fix ndlp kref issues due to race conditions between threads - Fix cancel els delay retry event which missed an ndlp reference count Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 4bae4a2ed2f1..ef061d97a222 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -1191,7 +1191,7 @@ lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport)
1191 shost = lpfc_shost_from_vport(vport); 1191 shost = lpfc_shost_from_vport(vport);
1192 spin_lock_irq(shost->host_lock); 1192 spin_lock_irq(shost->host_lock);
1193 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) 1193 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp)
1194 if (ndlp->rport) 1194 if (NLP_CHK_NODE_ACT(ndlp) && ndlp->rport)
1195 ndlp->rport->dev_loss_tmo = vport->cfg_devloss_tmo; 1195 ndlp->rport->dev_loss_tmo = vport->cfg_devloss_tmo;
1196 spin_unlock_irq(shost->host_lock); 1196 spin_unlock_irq(shost->host_lock);
1197} 1197}
@@ -2384,7 +2384,8 @@ lpfc_get_node_by_target(struct scsi_target *starget)
2384 spin_lock_irq(shost->host_lock); 2384 spin_lock_irq(shost->host_lock);
2385 /* Search for this, mapped, target ID */ 2385 /* Search for this, mapped, target ID */
2386 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) { 2386 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
2387 if (ndlp->nlp_state == NLP_STE_MAPPED_NODE && 2387 if (NLP_CHK_NODE_ACT(ndlp) &&
2388 ndlp->nlp_state == NLP_STE_MAPPED_NODE &&
2388 starget->id == ndlp->nlp_sid) { 2389 starget->id == ndlp->nlp_sid) {
2389 spin_unlock_irq(shost->host_lock); 2390 spin_unlock_irq(shost->host_lock);
2390 return ndlp; 2391 return ndlp;