• Justin Tee's avatar
    scsi: lpfc: Remove redundant clean up code in disable_vport() · f8139557
    Justin Tee authored
    The disable_vport() path calls the discovery state machine on all ndlps,
    puts them into NPR state, and then calls lpfc_cleanup_rpis() with the
    remove flag set.  This unintentionally decrements an ndlp's kref twice and
    can result in premature release of an ndlp because
    lpfc_dev_loss_tmo_handler() triggers clean up of the ndlp again later.
    
    Remove redundant code in disable_vport() that sets all the ndlps to NPR,
    and change the call to lpfc_cleanup_rpis() to not remove the ndlps.
    lpfc_dev_loss_tmo_handler() will handle final removal of the ndlps.
    Signed-off-by: default avatarJustin Tee <justin.tee@broadcom.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    f8139557
lpfc_vport.c 22.7 KB