diff options
author | Arun Easi <arun.easi@qlogic.com> | 2010-09-03 23:57:00 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-09-05 20:13:12 +0200 |
commit | feafb7b1714cf599a6d0fed45801ab3f66046cbd (patch) | |
tree | 9f8d61c64bc40fff36666f5b7f172fd2921da880 /drivers/scsi/qla2xxx/qla_mbx.c | |
parent | [SCSI] sd, sym53c8xx: Remove warnings after vsprintf %pV introducation. (diff) | |
download | linux-feafb7b1714cf599a6d0fed45801ab3f66046cbd.tar.xz linux-feafb7b1714cf599a6d0fed45801ab3f66046cbd.zip |
[SCSI] qla2xxx: Fix vport delete issues
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 6009b0c69488..a595ec8264f8 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -2913,7 +2913,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, uint16_t stat = le16_to_cpu(rptid_entry->vp_idx); struct qla_hw_data *ha = vha->hw; scsi_qla_host_t *vp; - scsi_qla_host_t *tvp; + unsigned long flags; if (rptid_entry->entry_status != 0) return; @@ -2945,9 +2945,12 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, return; } - list_for_each_entry_safe(vp, tvp, &ha->vp_list, list) + spin_lock_irqsave(&ha->vport_slock, flags); + list_for_each_entry(vp, &ha->vp_list, list) if (vp_idx == vp->vp_idx) break; + spin_unlock_irqrestore(&ha->vport_slock, flags); + if (!vp) return; |