scsi: lpfc: fix refcount error on node list
authorJames Smart <jsmart2021@gmail.com>
Wed, 21 Jun 2017 17:51:23 +0000 (10:51 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 26 Jun 2017 19:01:01 +0000 (15:01 -0400)
A change in remote port removal introduced a spurious put which can
cause a premature structure teardown. The affects were most notable when
the driver attempted to unload as a null pointer would be hit.

Fix by removing the unnecessary put.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_init.c

index 7e73fdc154f7b0bd760bfc2a2efad6b99e261104..491aa95eb0f6184cff8f0ea620d6c7a81e84a9e1 100644 (file)
@@ -2805,13 +2805,6 @@ lpfc_cleanup(struct lpfc_vport *vport)
                        lpfc_disc_state_machine(vport, ndlp, NULL,
                                        NLP_EVT_DEVICE_RECOVERY);
 
-               if (ndlp->nlp_fc4_type & NLP_FC4_NVME) {
-                       /* Remove the NVME transport reference now and
-                        * continue to remove the node.
-                        */
-                       lpfc_nlp_put(ndlp);
-               }
-
                lpfc_disc_state_machine(vport, ndlp, NULL,
                                             NLP_EVT_DEVICE_RM);
        }