Message ID | 20171110010834.4542-11-jsmart2021@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On 11/10/2017 02:08 AM, James Smart wrote: > pt2pt ndlp ref count prematurely goes to 0. There was reference > removed that should only be removed if connected to a switch, > not if in point-to-point mode. > > Add a mode check before the reference remove. > > Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> > Signed-off-by: James Smart <james.smart@broadcom.com> > --- > drivers/scsi/lpfc/lpfc_els.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c > index 532cd4b49c5d..911066c9612d 100644 > --- a/drivers/scsi/lpfc/lpfc_els.c > +++ b/drivers/scsi/lpfc/lpfc_els.c > @@ -2956,8 +2956,8 @@ lpfc_issue_els_scr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry) > /* This will cause the callback-function lpfc_cmpl_els_cmd to > * trigger the release of node. > */ > - > - lpfc_nlp_put(ndlp); > + if (!(vport->fc_flag & FC_PT2PT)) > + lpfc_nlp_put(ndlp); > return 0; > } > > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 532cd4b49c5d..911066c9612d 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -2956,8 +2956,8 @@ lpfc_issue_els_scr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry) /* This will cause the callback-function lpfc_cmpl_els_cmd to * trigger the release of node. */ - - lpfc_nlp_put(ndlp); + if (!(vport->fc_flag & FC_PT2PT)) + lpfc_nlp_put(ndlp); return 0; }