Skip to content

Commit e07ac2d

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Eliminate unnecessary relocking in lpfc_check_nlp_post_devloss()
In lpfc_check_nlp_post_devloss(), retaking of the ndlp lock in the if statement is useless because the very next line unlocks. Simply return to avoid relocking. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20231031191224.150862-5-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 1dec131 commit e07ac2d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/lpfc/lpfc_hbadisc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ lpfc_check_nlp_post_devloss(struct lpfc_vport *vport,
411411
"port_state = x%x\n",
412412
ndlp->nlp_DID, kref_read(&ndlp->kref), ndlp,
413413
ndlp->nlp_flag, vport->port_state);
414-
spin_lock_irqsave(&ndlp->lock, iflags);
414+
return;
415415
}
416416
spin_unlock_irqrestore(&ndlp->lock, iflags);
417417
}

0 commit comments

Comments
 (0)