From patchwork Wed Jul 28 22:59:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: babu moger X-Patchwork-Id: 114929 Received: from mx02.colomx.prod.int.phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6SN2a2F001112 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 mx02.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SN08ma014997; Wed, 28 Jul 2010 19:00:08 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SMxg7D025127 for ; Wed, 28 Jul 2010 18:59:42 -0400 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.5]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SMxblH017743 for ; Wed, 28 Jul 2010 18:59:37 -0400 Received: from na3sys009aog103.obsmtp.com (na3sys009aog103.obsmtp.com [74.125.149.71]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6SMxR3Z011079 for ; Wed, 28 Jul 2010 18:59:27 -0400 Received: from source ([147.145.40.20]) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKTFC2T7w/O9bYuUmu4rd4GbwY+JqATOUt@postini.com; Wed, 28 Jul 2010 15:59:28 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 o6SMxQgs000307; Wed, 28 Jul 2010 15:59:26 -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 o6SMxRbZ025712; Wed, 28 Jul 2010 15:59:27 -0700 Received: from cosmail01.lsi.com ([172.21.36.24]) by coshub01.lsi.com ([135.142.2.64]) with mapi; Wed, 28 Jul 2010 16:59:26 -0600 From: "Moger, Babu" To: device-mapper development , "linux-scsi@vger.kernel.org" Date: Wed, 28 Jul 2010 16:59:24 -0600 Thread-Topic: [PATCH 3/6] scsi_dh : release the refcounts in scsi_dh_alua handler when activate is complete Thread-Index: AcsuqIWxcFYnPrBtS+++5qIDzVwSlw== 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.18 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 o6SMxg7D025127 X-loop: dm-devel@redhat.com Cc: "Stankey, Robert" Subject: [dm-devel] [PATCH 3/6] scsi_dh : release the refcounts in scsi_dh_alua 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:22 +0000 (UTC) --- linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh_alua.c.orig 2010-07-23 05:58:39.000000000 -0500 +++ linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh_alua.c 2010-07-23 06:00:54.000000000 -0500 @@ -287,6 +287,8 @@ 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; } @@ -684,6 +686,8 @@ static int alua_activate(struct scsi_dev out: if (fn) fn(data, err); + kref_put(&sdev->scsi_dh_data->kref, scsi_dh_handler_cleanup); + put_device(&sdev->sdev_gendev); return 0; }