[SCSI] lpfc 8.3.39: Fixed deadlock between hbalock and nlp_lock use
authorJames Smart <james.smart@emulex.com>
Thu, 18 Apr 2013 00:18:19 +0000 (20:18 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 2 May 2013 20:03:52 +0000 (13:03 -0700)
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/lpfc/lpfc_hbadisc.c

index 3081db7..3faa0a9 100644 (file)
@@ -160,11 +160,12 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
        if (!list_empty(&evtp->evt_listp))
                return;
 
+       evtp->evt_arg1  = lpfc_nlp_get(ndlp);
+
        spin_lock_irq(&phba->hbalock);
        /* We need to hold the node by incrementing the reference
         * count until this queued work is done
         */
-       evtp->evt_arg1  = lpfc_nlp_get(ndlp);
        if (evtp->evt_arg1) {
                evtp->evt = LPFC_EVT_DEV_LOSS;
                list_add_tail(&evtp->evt_listp, &phba->work_list);