]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
lpfc: Correct reference counting of rport
authorJames Smart <james.smart@avagotech.com>
Thu, 21 May 2015 17:55:19 +0000 (13:55 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 19 Oct 2015 16:10:55 +0000 (09:10 -0700)
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
(cherry picked from commit 7aafb6e75e0212b5aa5b1f79737e6e8de40b1132)

Orabug: 22029622
From dick.kennedy@avagotech.com lpfc-10.5.0.1-11.0.0.3-1.tar.gz
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c

index 82edee8c72ed46c79a199dafe15b5c693b7557f6..e2426f858ec19b73bcbc7215d12ca9a23f40fda3 100644 (file)
@@ -161,7 +161,8 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
                        ndlp->rport = NULL;
                        if (put_node)
                                lpfc_nlp_put(ndlp);
-                       put_device(&rport->dev);
+                       if (put_rport)
+                               put_device(&rport->dev);
                        return;
                }