From patchwork Wed Jul 28 22:58:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: babu moger X-Patchwork-Id: 114932 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 o6SN1uLi000952 for ; Wed, 28 Jul 2010 23:02:32 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 o6SMxFMW014878; Wed, 28 Jul 2010 18:59:16 -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 o6SMxEFN025079 for ; Wed, 28 Jul 2010 18:59:14 -0400 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.12]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SMx8VF018104 for ; Wed, 28 Jul 2010 18:59:08 -0400 Received: from na3sys009aog113.obsmtp.com (na3sys009aog113.obsmtp.com [74.125.149.209]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6SMwwB0020428 for ; Wed, 28 Jul 2010 18:58:58 -0400 Received: from source ([147.145.40.20]) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTFC2MsWI91k6U3ar8VI8kz57sjp8JZLg@postini.com; Wed, 28 Jul 2010 15:58:59 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 o6SMwvFX000295; Wed, 28 Jul 2010 15:58:57 -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 o6SMwwBL025630; Wed, 28 Jul 2010 15:58:58 -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:58:57 -0600 From: "Moger, Babu" To: device-mapper development , "linux-scsi@vger.kernel.org" Date: Wed, 28 Jul 2010 16:58:55 -0600 Thread-Topic: [PATCH 1/6] scsi_dh : rename and export __detach_handler Thread-Index: AcsuqHR5VW62XVVeSzqoQ6INnlv36Q== 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.12 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 o6SMxEFN025079 X-loop: dm-devel@redhat.com Cc: "Stankey, Robert" Subject: [dm-devel] [PATCH 1/6] scsi_dh : rename and export __detach_handler 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:21 +0000 (UTC) diff -uprN -X linux-2.6.35-rc5-vanilla/Documentation/dontdiff linux-2.6.35-rc5-vanilla/drivers/scsi/device_handler/scsi_dh.c linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh.c --- linux-2.6.35-rc5-vanilla/drivers/scsi/device_handler/scsi_dh.c 2010-07-12 16:55:33.000000000 -0500 +++ linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh.c 2010-07-23 05:00:03.000000000 -0500 @@ -166,11 +166,12 @@ static int scsi_dh_handler_attach(struct return err; } -static void __detach_handler (struct kref *kref) +void scsi_dh_handler_cleanup(struct kref *kref) { struct scsi_dh_data *scsi_dh_data = container_of(kref, struct scsi_dh_data, kref); scsi_dh_data->scsi_dh->detach(scsi_dh_data->sdev); } +EXPORT_SYMBOL_GPL(scsi_dh_handler_cleanup); /* * scsi_dh_handler_detach - Detach a device handler from a device @@ -193,7 +194,7 @@ static void scsi_dh_handler_detach(struc scsi_dh = sdev->scsi_dh_data->scsi_dh; if (scsi_dh && scsi_dh->detach) - kref_put(&sdev->scsi_dh_data->kref, __detach_handler); + kref_put(&sdev->scsi_dh_data->kref, scsi_dh_handler_cleanup); } /* diff -uprN -X linux-2.6.35-rc5-vanilla/Documentation/dontdiff linux-2.6.35-rc5-vanilla/include/scsi/scsi_dh.h linux-2.6.35-rc5/include/scsi/scsi_dh.h --- linux-2.6.35-rc5-vanilla/include/scsi/scsi_dh.h 2010-07-12 16:55:33.000000000 -0500 +++ linux-2.6.35-rc5/include/scsi/scsi_dh.h 2010-07-23 04:57:17.000000000 -0500 @@ -61,6 +61,7 @@ extern int scsi_dh_handler_exist(const c extern int scsi_dh_attach(struct request_queue *, const char *); extern void scsi_dh_detach(struct request_queue *); extern int scsi_dh_set_params(struct request_queue *, const char *); +extern void scsi_dh_handler_cleanup(struct kref *kref); #else static inline int scsi_dh_activate(struct request_queue *req, activate_complete fn, void *data) @@ -84,4 +85,8 @@ static inline int scsi_dh_set_params(str { return -SCSI_DH_NOSYS; } +static void scsi_dh_handler_cleanup(struct kref *kref) +{ + return; +} #endif