scsi: lpfc: Add missing free iocb and nlp kref put for early return VMID cases
authorJames Smart <jsmart2021@gmail.com>
Sun, 11 Sep 2022 22:14:56 +0000 (15:14 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 16 Sep 2022 02:18:27 +0000 (22:18 -0400)
commit0630a1f7ea14452124392b883302713de31da3d0
tree79d0eae6950b16569f94dd0109b72117be2f4e36
parentb873d1037283b5082863b97443dd25e592c40684
scsi: lpfc: Add missing free iocb and nlp kref put for early return VMID cases

Sometimes VMID targets are not getting rediscovered after a port reset.

The iocb is not freed in lpfc_cmpl_ct_cmd_vmid(), which is the completion
function for the appid CT commands.  So after a port reset, the count of
sges is less than the expected count of 250.  This causes post reset
operation logic to fail and keep the port offline.

Fix by freeing the iocb and kref put for the lpfc_cmpl_ct_cmd_vmid() early
return cases.

Link: https://lore.kernel.org/r/20220911221505.117655-5-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_ct.c