]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
scsi: lpfc: Fix nvmet node ref count handling
authorJames Smart <jsmart2021@gmail.com>
Fri, 2 Jun 2017 04:07:00 +0000 (21:07 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 01:37:30 +0000 (21:37 -0400)
commit6599e12428a8b3b182e91818cb7b73ab29e7daff
tree861c9618d29a1f725f39e45705637bbd05830486
parent92721c3b97126a712af221635407251e42e58b60
scsi: lpfc: Fix nvmet node ref count handling

When unloading the driver, the NVMET driver would wait the full 30
seconds for its UNMAPPED initiator node to get removed before continuing
with the unload process.  NVMEI worked correctly.

For each rport put into UNMAPPED or MAPPED state by NVMET, the driver
puts a reference on the NDLP.  The difference is that NVMEI has a
unregister call for its rports and the extra reference is removed in the
unregister process.  For NVMET, the driver has to remove the reference
explicitly when dropping out of UNMAPPED or MAPPED because there is no
unregister call.

Add a call to lpfc_nlp_put on the ndlp when NVMET and the old state was
UNMAPPED or MAPPED.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c