]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] switch dasd
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 2 Mar 2008 15:36:08 +0000 (10:36 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 21 Oct 2008 11:48:40 +0000 (07:48 -0400)
->compat_ioctl() actually had been useless here; generic
logics works fine.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/s390/block/dasd.c
drivers/s390/block/dasd_int.h
drivers/s390/block/dasd_ioctl.c

index 6bf68e5fe89f81db95292cbc6fade87707831038..4b76fca64a6f1bf5538c8babc8595b15a234aa8e 100644 (file)
@@ -2011,10 +2011,9 @@ static void dasd_flush_request_queue(struct dasd_block *block)
        spin_unlock_irq(&block->request_queue_lock);
 }
 
-static int dasd_open(struct inode *inp, struct file *filp)
+static int dasd_open(struct block_device *bdev, fmode_t mode)
 {
-       struct gendisk *disk = inp->i_bdev->bd_disk;
-       struct dasd_block *block = disk->private_data;
+       struct dasd_block *block = bdev->bd_disk->private_data;
        struct dasd_device *base = block->base;
        int rc;
 
@@ -2052,9 +2051,8 @@ unlock:
        return rc;
 }
 
-static int dasd_release(struct inode *inp, struct file *filp)
+static int dasd_release(struct gendisk *disk, fmode_t mode)
 {
-       struct gendisk *disk = inp->i_bdev->bd_disk;
        struct dasd_block *block = disk->private_data;
 
        atomic_dec(&block->open_count);
@@ -2087,10 +2085,9 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
 struct block_device_operations
 dasd_device_operations = {
        .owner          = THIS_MODULE,
-       .__open         = dasd_open,
-       .__release      = dasd_release,
-       .__ioctl                = dasd_ioctl,
-       .__compat_ioctl = dasd_compat_ioctl,
+       .open           = dasd_open,
+       .release        = dasd_release,
+       .locked_ioctl   = dasd_ioctl,
        .getgeo         = dasd_getgeo,
 };
 
index 489d5fe488fb7d60616caebf36e78360ec4cfdd8..05a14536c369685985e39b225afc69b0e89e9930 100644 (file)
@@ -610,8 +610,7 @@ int dasd_scan_partitions(struct dasd_block *);
 void dasd_destroy_partitions(struct dasd_block *);
 
 /* externals in dasd_ioctl.c */
-int  dasd_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
-long dasd_compat_ioctl(struct file *, unsigned int, unsigned long);
+int  dasd_ioctl(struct block_device *, fmode_t, unsigned int, unsigned long);
 
 /* externals in dasd_proc.c */
 int dasd_proc_init(void);
index 91a64630cb0f4095f9fa9933189df9a520bd77ab..b82d816d9ef7adda1d7d9ddd3c6f463666dc041b 100644 (file)
@@ -366,10 +366,9 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
 }
 
 int
-dasd_ioctl(struct inode *inode, struct file *file,
+dasd_ioctl(struct block_device *bdev, fmode_t mode,
           unsigned int cmd, unsigned long arg)
 {
-       struct block_device *bdev = inode->i_bdev;
        struct dasd_block *block = bdev->bd_disk->private_data;
        void __user *argp = (void __user *)arg;
 
@@ -421,15 +420,3 @@ dasd_ioctl(struct inode *inode, struct file *file,
                return -EINVAL;
        }
 }
-
-long
-dasd_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
-{
-       int rval;
-
-       lock_kernel();
-       rval = dasd_ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg);
-       unlock_kernel();
-
-       return (rval == -EINVAL) ? -ENOIOCTLCMD : rval;
-}