aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
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)