FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 07-28-2010, 11:00 PM
"Moger, Babu"
 
Default scsi_dh : release the refcounts in scsi_dh_rdac handler when activate is complete

This patch releases the refcounts when activate is complete in scsi_dh_rdac handler.

Signed-off-by: Babu Moger <babu.moger@lsi.com>
---
--- linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2010-07-23 05:51:24.000000000 -0500
+++ linux-2.6.35-rc5/drivers/scsi/device_handler/scsi_dh_rdac.c 2010-07-23 05:54:05.000000000 -0500
@@ -209,6 +209,7 @@ static const char *lun_state[] =
struct rdac_queue_data {
struct list_head entry;
struct rdac_dh_data *h;
+ struct scsi_device *sdev;
activate_complete callback_fn;
void *callback_data;
};
@@ -614,6 +615,9 @@ done:
qdata->h->state = RDAC_STATE_ACTIVE;
if (qdata->callback_fn)
qdata->callback_fn(qdata->callback_data, err);
+ kref_put(&qdata->sdev->scsi_dh_data->kref,
+ scsi_dh_handler_cleanup);
+ put_device(&qdata->sdev->sdev_gendev);
kfree(qdata);
}
return;
@@ -630,6 +634,7 @@ static int queue_mode_select(struct scsi
return SCSI_DH_RETRY;

qdata->h = get_rdac_data(sdev);
+ qdata->sdev = sdev;
qdata->callback_fn = fn;
qdata->callback_data = data;

@@ -663,6 +668,8 @@ static int rdac_activate(struct scsi_dev
done:
if (fn)
fn(data, err);
+ kref_put(&sdev->scsi_dh_data->kref, scsi_dh_handler_cleanup);
+ put_device(&sdev->sdev_gendev);
return 0;
}




--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 02:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org