From patchwork Wed Jul 28 22:59:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: babu moger X-Patchwork-Id: 114933 Received: from mx01.colomx.prod.int.phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6SN2Y3a001109 for ; Wed, 28 Jul 2010 23:03:21 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SN0K4M023730; Wed, 28 Jul 2010 19:00:20 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SN0ILm025514 for ; Wed, 28 Jul 2010 19:00:18 -0400 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.5]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SN0DdH018378 for ; Wed, 28 Jul 2010 19:00:13 -0400 Received: from na3sys009aog105.obsmtp.com (na3sys009aog105.obsmtp.com [74.125.149.75]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6SN012R011149 for ; Wed, 28 Jul 2010 19:00:02 -0400 Received: from source ([147.145.40.20]) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKTFC2cREOsAXt0L9yxQnHaFZfEOHFh2jr@postini.com; Wed, 28 Jul 2010 16:00:04 PDT Received: from milmhbs0.lsil.com (mhbs.lsil.com [147.145.1.30]) by mail0.lsil.com (8.12.11/8.12.11) with ESMTP id o6SN00wh000325; Wed, 28 Jul 2010 16:00:00 -0700 (PDT) Received: from coshub01.lsi.com (coshub01.lsi.com [135.142.2.64]) by milmhbs0.lsil.com (8.12.11/8.12.11) with ESMTP id o6SN011H025826; Wed, 28 Jul 2010 16:00:01 -0700 Received: from cosmail01.lsi.com ([172.21.36.24]) by coshub01.lsi.com ([135.142.2.64]) with mapi; Wed, 28 Jul 2010 17:00:00 -0600 From: "Moger, Babu" To: device-mapper development , "linux-scsi@vger.kernel.org" Date: Wed, 28 Jul 2010 16:59:58 -0600 Thread-Topic: [PATCH 5/6] scsi_dh : release the refcounts in scsi_dh_hp_sw handler when activate is complete Thread-Index: AcsuqJoBRiF44ExWRX+aV35G0fi6LA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.5 X-Scanned-By: MIMEDefang 2.39 X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED,SPF_PASS) X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id o6SN0ILm025514 X-loop: dm-devel@redhat.com Cc: "Stankey, Robert" Subject: [dm-devel] [PATCH 5/6] scsi_dh : release the refcounts in scsi_dh_hp_sw handler when activate is complete X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 28 Jul 2010 23:03:24 +0000 (UTC) --- linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh_hp_sw.c.orig 2010-07-23 06:02:22.000000000 -0500 +++ linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh_hp_sw.c 2010-07-23 06:03:17.000000000 -0500 @@ -230,6 +230,9 @@ done: h->callback_fn(h->callback_data, err); h->callback_fn = h->callback_data = NULL; } + kref_put(&h->sdev->scsi_dh_data->kref, scsi_dh_handler_cleanup); + put_device(&h->sdev->sdev_gendev); + return; } @@ -307,6 +310,9 @@ static int hp_sw_activate(struct scsi_de if (fn) fn(data, ret); + kref_put(&sdev->scsi_dh_data->kref, scsi_dh_handler_cleanup); + put_device(&sdev->sdev_gendev); + return 0; }