aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 10:36:08 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:48:40 -0400
commit57a7c0bca009059d1d85bec608af70aa6c5f344c (patch)
tree79a7124566adfae19e379ce64252dc712d7cd795 /drivers/s390
parentaf0e2a0a87a7daeff9b77d82376c98fc6de3443f (diff)
[PATCH] switch dasd
->compat_ioctl() actually had been useless here; generic logics works fine. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd.c15
-rw-r--r--drivers/s390/block/dasd_int.h3
-rw-r--r--drivers/s390/block/dasd_ioctl.c15
3 files changed, 8 insertions, 25 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 6bf68e5fe89f..4b76fca64a6f 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2011,10 +2011,9 @@ static void dasd_flush_request_queue(struct dasd_block *block)
2011 spin_unlock_irq(&block->request_queue_lock); 2011 spin_unlock_irq(&block->request_queue_lock);
2012} 2012}
2013 2013
2014static int dasd_open(struct inode *inp, struct file *filp) 2014static int dasd_open(struct block_device *bdev, fmode_t mode)
2015{ 2015{
2016 struct gendisk *disk = inp->i_bdev->bd_disk; 2016 struct dasd_block *block = bdev->bd_disk->private_data;
2017 struct dasd_block *block = disk->private_data;
2018 struct dasd_device *base = block->base; 2017 struct dasd_device *base = block->base;
2019 int rc; 2018 int rc;
2020 2019
@@ -2052,9 +2051,8 @@ unlock:
2052 return rc; 2051 return rc;
2053} 2052}
2054 2053
2055static int dasd_release(struct inode *inp, struct file *filp) 2054static int dasd_release(struct gendisk *disk, fmode_t mode)
2056{ 2055{
2057 struct gendisk *disk = inp->i_bdev->bd_disk;
2058 struct dasd_block *block = disk->private_data; 2056 struct dasd_block *block = disk->private_data;
2059 2057
2060 atomic_dec(&block->open_count); 2058 atomic_dec(&block->open_count);
@@ -2087,10 +2085,9 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
2087struct block_device_operations 2085struct block_device_operations
2088dasd_device_operations = { 2086dasd_device_operations = {
2089 .owner = THIS_MODULE, 2087 .owner = THIS_MODULE,
2090 .__open = dasd_open, 2088 .open = dasd_open,
2091 .__release = dasd_release, 2089 .release = dasd_release,
2092 .__ioctl = dasd_ioctl, 2090 .locked_ioctl = dasd_ioctl,
2093 .__compat_ioctl = dasd_compat_ioctl,
2094 .getgeo = dasd_getgeo, 2091 .getgeo = dasd_getgeo,
2095}; 2092};
2096 2093
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h
index 489d5fe488fb..05a14536c369 100644
--- a/drivers/s390/block/dasd_int.h
+++ b/drivers/s390/block/dasd_int.h
@@ -610,8 +610,7 @@ int dasd_scan_partitions(struct dasd_block *);
610void dasd_destroy_partitions(struct dasd_block *); 610void dasd_destroy_partitions(struct dasd_block *);
611 611
612/* externals in dasd_ioctl.c */ 612/* externals in dasd_ioctl.c */
613int dasd_ioctl(struct inode *, struct file *, unsigned int, unsigned long); 613int dasd_ioctl(struct block_device *, fmode_t, unsigned int, unsigned long);
614long dasd_compat_ioctl(struct file *, unsigned int, unsigned long);
615 614
616/* externals in dasd_proc.c */ 615/* externals in dasd_proc.c */
617int dasd_proc_init(void); 616int dasd_proc_init(void);
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index 91a64630cb0f..b82d816d9ef7 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -366,10 +366,9 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
366} 366}
367 367
368int 368int
369dasd_ioctl(struct inode *inode, struct file *file, 369dasd_ioctl(struct block_device *bdev, fmode_t mode,
370 unsigned int cmd, unsigned long arg) 370 unsigned int cmd, unsigned long arg)
371{ 371{
372 struct block_device *bdev = inode->i_bdev;
373 struct dasd_block *block = bdev->bd_disk->private_data; 372 struct dasd_block *block = bdev->bd_disk->private_data;
374 void __user *argp = (void __user *)arg; 373 void __user *argp = (void __user *)arg;
375 374
@@ -421,15 +420,3 @@ dasd_ioctl(struct inode *inode, struct file *file,
421 return -EINVAL; 420 return -EINVAL;
422 } 421 }
423} 422}
424
425long
426dasd_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
427{
428 int rval;
429
430 lock_kernel();
431 rval = dasd_ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg);
432 unlock_kernel();
433
434 return (rval == -EINVAL) ? -ENOIOCTLCMD : rval;
435}