diff options
author | James Bottomley <JBottomley@Parallels.com> | 2013-06-27 08:07:53 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-06-27 08:07:53 +0200 |
commit | 36a279686bc02d340eb213a9f2a0b67e50de64b4 (patch) | |
tree | df6ab1cc69d4ce937471b33ca7d8c4ce9f55da05 /drivers/scsi/fcoe | |
parent | [SCSI] ipr: Avoid target_destroy accessing memory after it was freed (diff) | |
parent | MAINTAINERS: Fix fcoe mailing list (diff) | |
download | linux-36a279686bc02d340eb213a9f2a0b67e50de64b4.tar.xz linux-36a279686bc02d340eb213a9f2a0b67e50de64b4.zip |
Merge tag 'fcoe' into fixes
3.10 fixes
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/fcoe_ctlr.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index cd743c545ce9..795843dde8ec 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c @@ -1548,9 +1548,6 @@ static struct fcoe_fcf *fcoe_ctlr_select(struct fcoe_ctlr *fip) { struct fcoe_fcf *fcf; struct fcoe_fcf *best = fip->sel_fcf; - struct fcoe_fcf *first; - - first = list_first_entry(&fip->fcfs, struct fcoe_fcf, list); list_for_each_entry(fcf, &fip->fcfs, list) { LIBFCOE_FIP_DBG(fip, "consider FCF fab %16.16llx " @@ -1568,17 +1565,15 @@ static struct fcoe_fcf *fcoe_ctlr_select(struct fcoe_ctlr *fip) "" : "un"); continue; } - if (fcf->fabric_name != first->fabric_name || - fcf->vfid != first->vfid || - fcf->fc_map != first->fc_map) { + if (!best || fcf->pri < best->pri || best->flogi_sent) + best = fcf; + if (fcf->fabric_name != best->fabric_name || + fcf->vfid != best->vfid || + fcf->fc_map != best->fc_map) { LIBFCOE_FIP_DBG(fip, "Conflicting fabric, VFID, " "or FC-MAP\n"); return NULL; } - if (fcf->flogi_sent) - continue; - if (!best || fcf->pri < best->pri || best->flogi_sent) - best = fcf; } fip->sel_fcf = best; if (best) { |