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/ide/ide-cd.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/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index ef7e3a9bee51..bf9f61a5c2f8 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
34 | #include <linux/smp_lock.h> | ||
34 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
35 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
36 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
@@ -1654,7 +1655,7 @@ static int idecd_get_spindown(struct cdrom_device_info *cdi, unsigned long arg) | |||
1654 | return 0; | 1655 | return 0; |
1655 | } | 1656 | } |
1656 | 1657 | ||
1657 | static int idecd_ioctl(struct block_device *bdev, fmode_t mode, | 1658 | static int idecd_locked_ioctl(struct block_device *bdev, fmode_t mode, |
1658 | unsigned int cmd, unsigned long arg) | 1659 | unsigned int cmd, unsigned long arg) |
1659 | { | 1660 | { |
1660 | struct cdrom_info *info = ide_drv_g(bdev->bd_disk, cdrom_info); | 1661 | struct cdrom_info *info = ide_drv_g(bdev->bd_disk, cdrom_info); |
@@ -1676,6 +1677,19 @@ static int idecd_ioctl(struct block_device *bdev, fmode_t mode, | |||
1676 | return err; | 1677 | return err; |
1677 | } | 1678 | } |
1678 | 1679 | ||
1680 | static int idecd_ioctl(struct block_device *bdev, fmode_t mode, | ||
1681 | unsigned int cmd, unsigned long arg) | ||
1682 | { | ||
1683 | int ret; | ||
1684 | |||
1685 | lock_kernel(); | ||
1686 | ret = idecd_locked_ioctl(bdev, mode, cmd, arg); | ||
1687 | unlock_kernel(); | ||
1688 | |||
1689 | return ret; | ||
1690 | } | ||
1691 | |||
1692 | |||
1679 | static int idecd_media_changed(struct gendisk *disk) | 1693 | static int idecd_media_changed(struct gendisk *disk) |
1680 | { | 1694 | { |
1681 | struct cdrom_info *info = ide_drv_g(disk, cdrom_info); | 1695 | struct cdrom_info *info = ide_drv_g(disk, cdrom_info); |
@@ -1696,7 +1710,7 @@ static const struct block_device_operations idecd_ops = { | |||
1696 | .owner = THIS_MODULE, | 1710 | .owner = THIS_MODULE, |
1697 | .open = idecd_open, | 1711 | .open = idecd_open, |
1698 | .release = idecd_release, | 1712 | .release = idecd_release, |
1699 | .locked_ioctl = idecd_ioctl, | 1713 | .ioctl = idecd_ioctl, |
1700 | .media_changed = idecd_media_changed, | 1714 | .media_changed = idecd_media_changed, |
1701 | .revalidate_disk = idecd_revalidate_disk | 1715 | .revalidate_disk = idecd_revalidate_disk |
1702 | }; | 1716 | }; |