aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/ub.c
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 /drivers/block/ub.c
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 'drivers/block/ub.c')
-rw-r--r--drivers/block/ub.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index aaf27fb4efd6..102ed52d0e0f 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -28,6 +28,7 @@
28#include <linux/timer.h> 28#include <linux/timer.h>
29#include <linux/scatterlist.h> 29#include <linux/scatterlist.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/smp_lock.h>
31#include <scsi/scsi.h> 32#include <scsi/scsi.h>
32 33
33#define DRV_NAME "ub" 34#define DRV_NAME "ub"
@@ -1729,8 +1730,13 @@ static int ub_bd_ioctl(struct block_device *bdev, fmode_t mode,
1729{ 1730{
1730 struct gendisk *disk = bdev->bd_disk; 1731 struct gendisk *disk = bdev->bd_disk;
1731 void __user *usermem = (void __user *) arg; 1732 void __user *usermem = (void __user *) arg;
1733 int ret;
1734
1735 lock_kernel();
1736 ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, usermem);
1737 unlock_kernel();
1732 1738
1733 return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, usermem); 1739 return ret;
1734} 1740}
1735 1741
1736/* 1742/*
@@ -1794,7 +1800,7 @@ static const struct block_device_operations ub_bd_fops = {
1794 .owner = THIS_MODULE, 1800 .owner = THIS_MODULE,
1795 .open = ub_bd_open, 1801 .open = ub_bd_open,
1796 .release = ub_bd_release, 1802 .release = ub_bd_release,
1797 .locked_ioctl = ub_bd_ioctl, 1803 .ioctl = ub_bd_ioctl,
1798 .media_changed = ub_bd_media_changed, 1804 .media_changed = ub_bd_media_changed,
1799 .revalidate_disk = ub_bd_revalidate, 1805 .revalidate_disk = ub_bd_revalidate,
1800}; 1806};