diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-08 04:18:46 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:25:00 -0400 |
commit | 8a6cfeb6deca3a8fefd639d898b0d163c0b5d368 (patch) | |
tree | 9a633ad48c3b1ada0519ee7bade0602f940037f6 /block/ioctl.c | |
parent | 34484062445fe905bf02c72f87ddda21881acda3 (diff) |
block: push down BKL into .locked_ioctl
As a preparation for the removal of the big kernel
lock in the block layer, this removes the BKL
from the common ioctl handling code, moving it
into every single driver still using it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/ioctl.c')
-rw-r--r-- | block/ioctl.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/block/ioctl.c b/block/ioctl.c index e8eb679f2f9b..1cfa8d449d90 100644 --- a/block/ioctl.c +++ b/block/ioctl.c | |||
@@ -163,18 +163,10 @@ int __blkdev_driver_ioctl(struct block_device *bdev, fmode_t mode, | |||
163 | unsigned cmd, unsigned long arg) | 163 | unsigned cmd, unsigned long arg) |
164 | { | 164 | { |
165 | struct gendisk *disk = bdev->bd_disk; | 165 | struct gendisk *disk = bdev->bd_disk; |
166 | int ret; | ||
167 | 166 | ||
168 | if (disk->fops->ioctl) | 167 | if (disk->fops->ioctl) |
169 | return disk->fops->ioctl(bdev, mode, cmd, arg); | 168 | return disk->fops->ioctl(bdev, mode, cmd, arg); |
170 | 169 | ||
171 | if (disk->fops->locked_ioctl) { | ||
172 | lock_kernel(); | ||
173 | ret = disk->fops->locked_ioctl(bdev, mode, cmd, arg); | ||
174 | unlock_kernel(); | ||
175 | return ret; | ||
176 | } | ||
177 | |||
178 | return -ENOTTY; | 170 | return -ENOTTY; |
179 | } | 171 | } |
180 | /* | 172 | /* |
@@ -185,8 +177,7 @@ int __blkdev_driver_ioctl(struct block_device *bdev, fmode_t mode, | |||
185 | EXPORT_SYMBOL_GPL(__blkdev_driver_ioctl); | 177 | EXPORT_SYMBOL_GPL(__blkdev_driver_ioctl); |
186 | 178 | ||
187 | /* | 179 | /* |
188 | * always keep this in sync with compat_blkdev_ioctl() and | 180 | * always keep this in sync with compat_blkdev_ioctl() |
189 | * compat_blkdev_locked_ioctl() | ||
190 | */ | 181 | */ |
191 | int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, | 182 | int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, |
192 | unsigned long arg) | 183 | unsigned long arg) |