Commit 57a7c0bc authored by Al Viro's avatar Al Viro

[PATCH] switch dasd

->compat_ioctl() actually had been useless here; generic
logics works fine.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent af0e2a0a
...@@ -2011,10 +2011,9 @@ static void dasd_flush_request_queue(struct dasd_block *block) ...@@ -2011,10 +2011,9 @@ static void dasd_flush_request_queue(struct dasd_block *block)
spin_unlock_irq(&block->request_queue_lock); 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 = bdev->bd_disk->private_data;
struct dasd_block *block = disk->private_data;
struct dasd_device *base = block->base; struct dasd_device *base = block->base;
int rc; int rc;
...@@ -2052,9 +2051,8 @@ static int dasd_open(struct inode *inp, struct file *filp) ...@@ -2052,9 +2051,8 @@ static int dasd_open(struct inode *inp, struct file *filp)
return rc; 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; struct dasd_block *block = disk->private_data;
atomic_dec(&block->open_count); atomic_dec(&block->open_count);
...@@ -2087,10 +2085,9 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo) ...@@ -2087,10 +2085,9 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
struct block_device_operations struct block_device_operations
dasd_device_operations = { dasd_device_operations = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.__open = dasd_open, .open = dasd_open,
.__release = dasd_release, .release = dasd_release,
.__ioctl = dasd_ioctl, .locked_ioctl = dasd_ioctl,
.__compat_ioctl = dasd_compat_ioctl,
.getgeo = dasd_getgeo, .getgeo = dasd_getgeo,
}; };
......
...@@ -610,8 +610,7 @@ int dasd_scan_partitions(struct dasd_block *); ...@@ -610,8 +610,7 @@ int dasd_scan_partitions(struct dasd_block *);
void dasd_destroy_partitions(struct dasd_block *); void dasd_destroy_partitions(struct dasd_block *);
/* externals in dasd_ioctl.c */ /* externals in dasd_ioctl.c */
int dasd_ioctl(struct inode *, struct file *, unsigned int, unsigned long); int dasd_ioctl(struct block_device *, fmode_t, unsigned int, unsigned long);
long dasd_compat_ioctl(struct file *, unsigned int, unsigned long);
/* externals in dasd_proc.c */ /* externals in dasd_proc.c */
int dasd_proc_init(void); int dasd_proc_init(void);
......
...@@ -366,10 +366,9 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd, ...@@ -366,10 +366,9 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
} }
int int
dasd_ioctl(struct inode *inode, struct file *file, dasd_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct block_device *bdev = inode->i_bdev;
struct dasd_block *block = bdev->bd_disk->private_data; struct dasd_block *block = bdev->bd_disk->private_data;
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
...@@ -421,15 +420,3 @@ dasd_ioctl(struct inode *inode, struct file *file, ...@@ -421,15 +420,3 @@ dasd_ioctl(struct inode *inode, struct file *file,
return -EINVAL; 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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment