Skip to content

Commit b5bf6d6

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Decrement ndlp kref after FDISC retries exhausted
The kref for Fabric_DID ndlps is not decremented after repeated FDISC failures and exhausting maximum allowed retries. This can leave the ndlp lingering unnecessarily. Add a test and set bit operation for the NLP_DROPPED flag. If not previously set, then a kref is decremented. The ndlp is freed when the remaining reference for the completing ELS is put. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Message-ID: <20250915180811.137530-6-justintee8345@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent a4809b9 commit b5bf6d6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11259,6 +11259,11 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
1125911259
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
1126011260
"0126 FDISC cmpl status: x%x/x%x)\n",
1126111261
ulp_status, ulp_word4);
11262+
11263+
/* drop initial reference */
11264+
if (!test_and_set_bit(NLP_DROPPED, &ndlp->nlp_flag))
11265+
lpfc_nlp_put(ndlp);
11266+
1126211267
goto fdisc_failed;
1126311268
}
1126411269

0 commit comments

Comments
 (0)