]> git.hungrycats.org Git - linux/commit
[PATCH] change sdev.access_count to an atomic_t
authorChristoph Hellwig <hch@lst.de>
Thu, 25 Sep 2003 06:54:19 +0000 (01:54 -0500)
committerJames Bottomley <jejb@raven.il.steeleye.com>
Thu, 25 Sep 2003 06:54:19 +0000 (01:54 -0500)
commit70e28c9d9208decd9c98e8f91fd4cdd557974abe
tree509696aec29763f856f90d148f7148f50174f385
parent47f64403da46a7211d5c842d54799b0aeba92b27
[PATCH] change sdev.access_count to an atomic_t

For various reasons (e.g. the .my_devices lockdown) it's undesirable
to have scsi_device_{get,put} blocking.  Change .access_count to an
atomic_t to avoid the driver model r/w semaphore.

Sideeffects:

 - possible module reference leak in scsi_device_get when get_device
   fails fixes.
 - the access_count attribute is gone.  We already have this exposed
   to userspace in too many places given that this whole second
   refcount will go away once Al fixes the block layer.
drivers/scsi/scsi.c
drivers/scsi/scsi_proc.c
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_sysfs.c
drivers/scsi/sg.c
include/scsi/scsi_device.h