diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-08 08:18:46 (GMT) |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 16:25:00 (GMT) |
commit | 8a6cfeb6deca3a8fefd639d898b0d163c0b5d368 (patch) | |
tree | 9a633ad48c3b1ada0519ee7bade0602f940037f6 /drivers/cdrom/viocd.c | |
parent | 34484062445fe905bf02c72f87ddda21881acda3 (diff) | |
download | linux-fsl-qoriq-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.tar.xz |
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 'drivers/cdrom/viocd.c')
-rw-r--r-- | drivers/cdrom/viocd.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 1fa6628..16dada0 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c @@ -42,6 +42,7 @@ #include <linux/module.h> #include <linux/completion.h> #include <linux/proc_fs.h> +#include <linux/smp_lock.h> #include <linux/seq_file.h> #include <linux/scatterlist.h> @@ -167,7 +168,13 @@ static int viocd_blk_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, unsigned long arg) { struct disk_info *di = bdev->bd_disk->private_data; - return cdrom_ioctl(&di->viocd_info, bdev, mode, cmd, arg); + int ret; + + lock_kernel(); + ret = cdrom_ioctl(&di->viocd_info, bdev, mode, cmd, arg); + unlock_kernel(); + + return ret; } static int viocd_blk_media_changed(struct gendisk *disk) @@ -180,7 +187,7 @@ static const struct block_device_operations viocd_fops = { .owner = THIS_MODULE, .open = viocd_blk_open, .release = viocd_blk_release, - .locked_ioctl = viocd_blk_ioctl, + .ioctl = viocd_blk_ioctl, .media_changed = viocd_blk_media_changed, }; |