summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-11-29 15:25:26 +0100
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 19:01:45 +0100
commitd6ae4333e648492721a098bdc329bbd82d25eb67 (patch)
tree88a78be7ebd13ac3d1cfb386dd1a9bb68ba9aa1f /include/scsi
parent[SCSI] osduld: Ref-counting bug fix (diff)
downloadlinux-d6ae4333e648492721a098bdc329bbd82d25eb67.tar.xz
linux-d6ae4333e648492721a098bdc329bbd82d25eb67.zip
[SCSI] osduld: Use device->release instead of internal kref
The true logic of this patch will be clear in the next patch where we use the class_find_device() API. When doing so the use of an internal kref leaves us a narrow window where a find is started while the actual object can go away. Using the device's kobj reference solves this problem because now the same kref is used for both operations. (Remove and find) Core changes * Embed a struct device in uld_ structure and use device_register instead of devie_create. Set __remove to be the device release function. * __uld_get/put is just get_/put_device. Now every thing is accounted for on the device object. Internal kref is removed. * At __remove() we can safely de-allocate the uld_ structure. (The function has moved to avoid forward declaration) Some cleanups * Use class register/unregister is cleaner for this driver now. * cdev ref-counting games are no longer necessary I have incremented the device version string in case of new bugs. Note: Previous bugfix of taking the reference around fput() still applies. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/osd_initiator.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h
index f787d24d3bab..589e5f0d67b1 100644
--- a/include/scsi/osd_initiator.h
+++ b/include/scsi/osd_initiator.h
@@ -48,7 +48,6 @@ enum osd_std_version {
*/
struct osd_dev {
struct scsi_device *scsi_device;
- struct file *file;
unsigned def_timeout;
#ifdef OSD_VER1_SUPPORT