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 /drivers/block/paride/pd.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 '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 4e8b9bff3abe..c4d6ed9846ca 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}; | |||
153 | #include <linux/blkdev.h> | 153 | #include <linux/blkdev.h> |
154 | #include <linux/blkpg.h> | 154 | #include <linux/blkpg.h> |
155 | #include <linux/kernel.h> | 155 | #include <linux/kernel.h> |
156 | #include <linux/smp_lock.h> | ||
156 | #include <asm/uaccess.h> | 157 | #include <asm/uaccess.h> |
157 | #include <linux/workqueue.h> | 158 | #include <linux/workqueue.h> |
158 | 159 | ||
@@ -768,8 +769,10 @@ static int pd_ioctl(struct block_device *bdev, fmode_t mode, | |||
768 | 769 | ||
769 | switch (cmd) { | 770 | switch (cmd) { |
770 | case CDROMEJECT: | 771 | case CDROMEJECT: |
772 | lock_kernel(); | ||
771 | if (disk->access == 1) | 773 | if (disk->access == 1) |
772 | pd_special_command(disk, pd_eject); | 774 | pd_special_command(disk, pd_eject); |
775 | unlock_kernel(); | ||
773 | return 0; | 776 | return 0; |
774 | default: | 777 | default: |
775 | return -EINVAL; | 778 | return -EINVAL; |
@@ -812,7 +815,7 @@ static const struct block_device_operations pd_fops = { | |||
812 | .owner = THIS_MODULE, | 815 | .owner = THIS_MODULE, |
813 | .open = pd_open, | 816 | .open = pd_open, |
814 | .release = pd_release, | 817 | .release = pd_release, |
815 | .locked_ioctl = pd_ioctl, | 818 | .ioctl = pd_ioctl, |
816 | .getgeo = pd_getgeo, | 819 | .getgeo = pd_getgeo, |
817 | .media_changed = pd_check_media, | 820 | .media_changed = pd_check_media, |
818 | .revalidate_disk= pd_revalidate | 821 | .revalidate_disk= pd_revalidate |