diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-08 10:18:46 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 18:25:00 +0200 |
commit | 8a6cfeb6deca3a8fefd639d898b0d163c0b5d368 (patch) | |
tree | 9a633ad48c3b1ada0519ee7bade0602f940037f6 /drivers/block/paride/pd.c | |
parent | 34484062445fe905bf02c72f87ddda21881acda3 (diff) | |
download | linux-3.10-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.tar.gz linux-3.10-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.tar.bz2 linux-3.10-8a6cfeb6deca3a8fefd639d898b0d163c0b5d368.zip |
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/block/paride/pd.c')
-rw-r--r-- | drivers/block/paride/pd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 4e8b9bff3ab..c4d6ed9846c 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c @@ -153,6 +153,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_GEO, D_SBY, D_DLY, D_SLV}; #include <linux/blkdev.h> #include <linux/blkpg.h> #include <linux/kernel.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <linux/workqueue.h> @@ -768,8 +769,10 @@ static int pd_ioctl(struct block_device *bdev, fmode_t mode, switch (cmd) { case CDROMEJECT: + lock_kernel(); if (disk->access == 1) pd_special_command(disk, pd_eject); + unlock_kernel(); return 0; default: return -EINVAL; @@ -812,7 +815,7 @@ static const struct block_device_operations pd_fops = { .owner = THIS_MODULE, .open = pd_open, .release = pd_release, - .locked_ioctl = pd_ioctl, + .ioctl = pd_ioctl, .getgeo = pd_getgeo, .media_changed = pd_check_media, .revalidate_disk= pd_revalidate |