aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-07-08 04:18:46 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:25:00 -0400
commit8a6cfeb6deca3a8fefd639d898b0d163c0b5d368 (patch)
tree9a633ad48c3b1ada0519ee7bade0602f940037f6 /block
parent34484062445fe905bf02c72f87ddda21881acda3 (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')
-rw-r--r--block/ioctl.c11
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,
185EXPORT_SYMBOL_GPL(__blkdev_driver_ioctl); 177EXPORT_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 */
191int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, 182int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
192 unsigned long arg) 183 unsigned long arg)