diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-07 10:51:29 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:26:08 -0400 |
commit | 409f3499a2cfcd1e9c2857c53af7fcce069f027f (patch) | |
tree | 7275165954c7f1143d219f4b141888d6c0a5a4ab /drivers/scsi/sd.h | |
parent | 15392efb9d427482754f6d267262452878667499 (diff) |
scsi/sd: remove big kernel lock
Every user of the BKL in the sd driver is the
result of the pushdown from the block layer
into the open/close/ioctl functions.
The only place that used to rely on the BKL is
the sdkp->openers variable, which gets converted
into an atomic_t.
Nothing else seems to rely on the BKL, since the
functions do not touch global data without holding
another lock, and the open/close functions are
still protected from concurrent execution using
the bdev->bd_mutex.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-scsi@vger.kernel.org
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/scsi/sd.h')
-rw-r--r-- | drivers/scsi/sd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 43d3caf268ef..f81a9309e6de 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h | |||
@@ -47,7 +47,7 @@ struct scsi_disk { | |||
47 | struct scsi_device *device; | 47 | struct scsi_device *device; |
48 | struct device dev; | 48 | struct device dev; |
49 | struct gendisk *disk; | 49 | struct gendisk *disk; |
50 | unsigned int openers; /* protected by BKL for now, yuck */ | 50 | atomic_t openers; |
51 | sector_t capacity; /* size in 512-byte sectors */ | 51 | sector_t capacity; /* size in 512-byte sectors */ |
52 | u32 index; | 52 | u32 index; |
53 | unsigned short hw_sector_size; | 53 | unsigned short hw_sector_size; |