Skip to content

Commit 57a7c0b

Browse files
author
Al Viro
committed
[PATCH] switch dasd
->compat_ioctl() actually had been useless here; generic logics works fine. Signed-off-by: Al Viro <[email protected]>
1 parent af0e2a0 commit 57a7c0b

File tree

3 files changed

+8
-25
lines changed

3 files changed

+8
-25
lines changed

drivers/s390/block/dasd.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,10 +2011,9 @@ static void dasd_flush_request_queue(struct dasd_block *block)
20112011
spin_unlock_irq(&block->request_queue_lock);
20122012
}
20132013

2014-
static int dasd_open(struct inode *inp, struct file *filp)
2014+
static int dasd_open(struct block_device *bdev, fmode_t mode)
20152015
{
2016-
struct gendisk *disk = inp->i_bdev->bd_disk;
2017-
struct dasd_block *block = disk->private_data;
2016+
struct dasd_block *block = bdev->bd_disk->private_data;
20182017
struct dasd_device *base = block->base;
20192018
int rc;
20202019

@@ -2052,9 +2051,8 @@ static int dasd_open(struct inode *inp, struct file *filp)
20522051
return rc;
20532052
}
20542053

2055-
static int dasd_release(struct inode *inp, struct file *filp)
2054+
static int dasd_release(struct gendisk *disk, fmode_t mode)
20562055
{
2057-
struct gendisk *disk = inp->i_bdev->bd_disk;
20582056
struct dasd_block *block = disk->private_data;
20592057

20602058
atomic_dec(&block->open_count);
@@ -2087,10 +2085,9 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
20872085
struct block_device_operations
20882086
dasd_device_operations = {
20892087
.owner = THIS_MODULE,
2090-
.__open = dasd_open,
2091-
.__release = dasd_release,
2092-
.__ioctl = dasd_ioctl,
2093-
.__compat_ioctl = dasd_compat_ioctl,
2088+
.open = dasd_open,
2089+
.release = dasd_release,
2090+
.locked_ioctl = dasd_ioctl,
20942091
.getgeo = dasd_getgeo,
20952092
};
20962093

drivers/s390/block/dasd_int.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,7 @@ int dasd_scan_partitions(struct dasd_block *);
610610
void dasd_destroy_partitions(struct dasd_block *);
611611

612612
/* externals in dasd_ioctl.c */
613-
int dasd_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
614-
long dasd_compat_ioctl(struct file *, unsigned int, unsigned long);
613+
int dasd_ioctl(struct block_device *, fmode_t, unsigned int, unsigned long);
615614

616615
/* externals in dasd_proc.c */
617616
int dasd_proc_init(void);

drivers/s390/block/dasd_ioctl.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,9 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
366366
}
367367

368368
int
369-
dasd_ioctl(struct inode *inode, struct file *file,
369+
dasd_ioctl(struct block_device *bdev, fmode_t mode,
370370
unsigned int cmd, unsigned long arg)
371371
{
372-
struct block_device *bdev = inode->i_bdev;
373372
struct dasd_block *block = bdev->bd_disk->private_data;
374373
void __user *argp = (void __user *)arg;
375374

@@ -421,15 +420,3 @@ dasd_ioctl(struct inode *inode, struct file *file,
421420
return -EINVAL;
422421
}
423422
}
424-
425-
long
426-
dasd_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-
}

0 commit comments

Comments
 (0)