aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.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/ide/ide-tape.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/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 635fd72d4728..39b0a5c45f07 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -32,6 +32,7 @@
32#include <linux/errno.h> 32#include <linux/errno.h>
33#include <linux/genhd.h> 33#include <linux/genhd.h>
34#include <linux/seq_file.h> 34#include <linux/seq_file.h>
35#include <linux/smp_lock.h>
35#include <linux/slab.h> 36#include <linux/slab.h>
36#include <linux/pci.h> 37#include <linux/pci.h>
37#include <linux/ide.h> 38#include <linux/ide.h>
@@ -1927,9 +1928,14 @@ static int idetape_ioctl(struct block_device *bdev, fmode_t mode,
1927{ 1928{
1928 struct ide_tape_obj *tape = ide_drv_g(bdev->bd_disk, ide_tape_obj); 1929 struct ide_tape_obj *tape = ide_drv_g(bdev->bd_disk, ide_tape_obj);
1929 ide_drive_t *drive = tape->drive; 1930 ide_drive_t *drive = tape->drive;
1930 int err = generic_ide_ioctl(drive, bdev, cmd, arg); 1931 int err;
1932
1933 lock_kernel();
1934 err = generic_ide_ioctl(drive, bdev, cmd, arg);
1931 if (err == -EINVAL) 1935 if (err == -EINVAL)
1932 err = idetape_blkdev_ioctl(drive, cmd, arg); 1936 err = idetape_blkdev_ioctl(drive, cmd, arg);
1937 unlock_kernel();
1938
1933 return err; 1939 return err;
1934} 1940}
1935 1941
@@ -1937,7 +1943,7 @@ static const struct block_device_operations idetape_block_ops = {
1937 .owner = THIS_MODULE, 1943 .owner = THIS_MODULE,
1938 .open = idetape_open, 1944 .open = idetape_open,
1939 .release = idetape_release, 1945 .release = idetape_release,
1940 .locked_ioctl = idetape_ioctl, 1946 .ioctl = idetape_ioctl,
1941}; 1947};
1942 1948
1943static int ide_tape_probe(ide_drive_t *drive) 1949static int ide_tape_probe(ide_drive_t *drive)