From patchwork Thu May 21 17:55:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 6457971 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3A2499F402 for ; Thu, 21 May 2015 17:55:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6205320524 for ; Thu, 21 May 2015 17:55:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 753D220523 for ; Thu, 21 May 2015 17:55:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964793AbbEURz3 (ORCPT ); Thu, 21 May 2015 13:55:29 -0400 Received: from mail-qk0-f169.google.com ([209.85.220.169]:34460 "EHLO mail-qk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932217AbbEURzZ (ORCPT ); Thu, 21 May 2015 13:55:25 -0400 Received: by qkgx75 with SMTP id x75so61582022qkg.1 for ; Thu, 21 May 2015 10:55:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=6I8ACyejtGOFcJZ41C6IRBs5ikwKiQIr8sY/g/y39Mc=; b=Di5YQ1BO1tmn6uILVstrGvzJDNvin1bqvNgpBAL9Vfp4BmXRngiIdMjXdiO5P4U1Ni BM/xOPrryQQ5MWmH9V21zQGik7d05N4EKVlhW9KIBBYqojsrwzsnCegdEZ9CQOYp4ire P6JllRzNf9djqUhTLec3rB88wv858339xpZ5FbI06Qx2DWAj3FVbAEvqG2hwihBEXs84 BV1gZm7CnorqlAvmpjgdZWsBnlZ+kViaxQAahgdXYg9CI8TiByhM1mlZ5a9hY5NH0tVH bTLs3zcOgX3kI8Hcfv9MaN9fS9mTeNzquETV1lr1MDki6oMJdi1JWzMVdfG9J2IEHLOG F+AA== X-Gm-Message-State: ALoCoQnI7wg79v2j3l2Hfp2z8w6Pk+jKsRzdw5IkMALathVTiBz5O+nf2N5qS5yPlgpGIq5q1779 X-Received: by 10.55.31.168 with SMTP id n40mr9254224qkh.56.1432230924452; Thu, 21 May 2015 10:55:24 -0700 (PDT) Received: from myfc17 (c-75-67-235-135.hsd1.nh.comcast.net. [75.67.235.135]) by mx.google.com with ESMTPSA id b5sm13764875qkh.36.2015.05.21.10.55.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 21 May 2015 10:55:24 -0700 (PDT) Date: Thu, 21 May 2015 13:55:19 -0400 From: james.smart@avagotech.com (James Smart) To: linux-scsi@vger.kernel.org Subject: [PATCH v2 04/15] lpfc: Correct reference counting of rport Message-ID: <555e1c07.dPcUVpmrrj6KDZ3q%james.smart@avagotech.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Correct reference counting of rport Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_hbadisc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 72388a6..e93705d 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -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; }