aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_plugin.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-11-29 09:25:26 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:01:45 -0500
commitd6ae4333e648492721a098bdc329bbd82d25eb67 (patch)
tree88a78be7ebd13ac3d1cfb386dd1a9bb68ba9aa1f /kernel/rcutree_plugin.h
parent89f5e1f2f13b1079b8d7ff7d3ade345b7ad7c009 (diff)
[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 'kernel/rcutree_plugin.h')
0 files changed, 0 insertions, 0 deletions