changed ioctls to unlocked
PATCH 13/13 changed ioctls to unlocked
From: Stoyan Gaydarov <[email protected]>
Signed-off-by Stoyan Gaydarov <[email protected]>
--- drivers/message/i2o/i2o_config.c | 13 +++++++------ drivers/parisc/eisa_eeprom.c | 5 ++--- 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/message/i2o/i2o_config.c +7 -6
@@ -40,8 +40,7 @@#define SG_TABLESIZE 30 -static int i2o_cfg_ioctl (struct inode *,struct file *,unsigned int , -unsigned long ); +static long i2o_cfg_ioctl (struct file *,unsigned int ,unsigned long );static spinlock_t i2o_config_lock;
@@ -751,7 +750,7 @@ static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,lock_kernel ();switch (cmd) {case I2OGETIOPS : - ret =i2o_cfg_ioctl (NULL , file, cmd, arg); + ret =i2o_cfg_ioctl (file, cmd, arg);break ;case I2OPASSTHRU32 : ret =i2o_cfg_passthru32 (file, cmd, arg);
@@ -984,10 +983,11 @@ out:/* * IOCTL Handler */ -static int i2o_cfg_ioctl (struct inode *inode,struct file *fp,unsigned int cmd, -unsigned long arg) +static long i2o_cfg_ioctl (struct file *fp,unsigned int cmd, +unsigned long arg) {int ret; +lock_kernel ();switch (cmd) {case I2OGETIOPS :
@@ -1045,6 +1045,7 @@ static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd, ret = -EINVAL ; } +unlock_kernel ();return ret; }
@@ -1118,7 +1119,7 @@ static int cfg_release(struct inode *inode, struct file *file)static const struct file_operations config_fops = { .owner =THIS_MODULE , .llseek = no_llseek, - .ioctl = i2o_cfg_ioctl, + .unlocked_ioctl = i2o_cfg_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = i2o_cfg_compat_ioctl, #endif
drivers/parisc/eisa_eeprom.c +2 -3
@@ -75,8 +75,7 @@ static ssize_t eisa_eeprom_read(struct file * file,return ret; } -static int eisa_eeprom_ioctl (struct inode *inode,struct file *file, -unsigned int cmd, +static long eisa_eeprom_ioctl (struct file *file,unsigned int cmd,unsigned long arg) {return -ENOTTY ;
@@ -104,7 +103,7 @@ static const struct file_operations eisa_eeprom_fops = { .owner = THIS_MODULE, .llseek = eisa_eeprom_llseek, .read = eisa_eeprom_read, - .ioctl = eisa_eeprom_ioctl, + .unlocked_ioctl = eisa_eeprom_ioctl, .open = eisa_eeprom_open, .release = eisa_eeprom_release, };
Signature · 1 line
1.6.2