scsi: lpfc: Remove duplicate ndlp kref decrement in lpfc_cleanup_rpis()
authorJustin Tee <justin.tee@broadcom.com>
Mon, 9 Jan 2023 23:33:11 +0000 (15:33 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 12 Jan 2023 05:03:14 +0000 (00:03 -0500)
commitecdf4ddf4eb7a9135abdb358e98a8e6c1e8effe6
treeb4ce80aa7094f3d6bacdbe7baf9d77ad6d23f631
parentf81395570e6c08ec1ef11eda433856c1a6805077
scsi: lpfc: Remove duplicate ndlp kref decrement in lpfc_cleanup_rpis()

With faulty cables in PT2PT topology, an unintentional ndlp double kref
decrement can occur.

If a FLOGI request is outstanding before the link goes down, the missing
FLOGI_ACC causes an F_Port ndlp to remain in the UNUSED state.  During link
down, lpfc_cleanup_rpis() is called and decrements an ndlp kref.
Additionally, when the driver later decides to abort the FLOGI, the FLOGI
completion handler decrements the ndlp kref a second time.

Remove duplicate clean up logic in lpfc_cleanup_rpis() because the updated
FLOGI completion handler already handles the ndlp kref decrement.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c