[S390] dasd: enable compat ioctls
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 26 Mar 2009 14:23:45 +0000 (15:23 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 26 Mar 2009 14:24:04 +0000 (15:24 +0100)
All of the ioctls are compatible. Just enable them.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c
drivers/s390/block/dasd_ioctl.c

index 08c23a921012d4a771b2171b712fdd1b8f653c0f..93972ed7f2df0eb792a978c6c9552a6e99ead831 100644 (file)
@@ -2101,7 +2101,8 @@ dasd_device_operations = {
        .owner          = THIS_MODULE,
        .open           = dasd_open,
        .release        = dasd_release,
-       .locked_ioctl   = dasd_ioctl,
+       .ioctl          = dasd_ioctl,
+       .compat_ioctl   = dasd_ioctl,
        .getgeo         = dasd_getgeo,
 };
 
index b82d816d9ef7adda1d7d9ddd3c6f463666dc041b..16e6ba462cb6d673f6122e93018d89a3c7d266ce 100644 (file)
@@ -365,9 +365,9 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
        return ret;
 }
 
-int
-dasd_ioctl(struct block_device *bdev, fmode_t mode,
-          unsigned int cmd, unsigned long arg)
+static int
+dasd_do_ioctl(struct block_device *bdev, fmode_t mode,
+             unsigned int cmd, unsigned long arg)
 {
        struct dasd_block *block = bdev->bd_disk->private_data;
        void __user *argp = (void __user *)arg;
@@ -420,3 +420,14 @@ dasd_ioctl(struct block_device *bdev, fmode_t mode,
                return -EINVAL;
        }
 }
+
+int dasd_ioctl(struct block_device *bdev, fmode_t mode,
+              unsigned int cmd, unsigned long arg)
+{
+       int rc;
+
+       lock_kernel();
+       rc = dasd_do_ioctl(bdev, mode, cmd, arg);
+       unlock_kernel();
+       return rc;
+}