i2o: propogate the BKL down into the ioctl method

Nobody seems to want to own I2O patches so sending this one directly.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
5d9d6e44 6432e734

+6 -7
+6 -7
drivers/message/i2o/i2o_config.c
··· 40 41 #define SG_TABLESIZE 30 42 43 - static int i2o_cfg_ioctl(struct inode *, struct file *, unsigned int, 44 - unsigned long); 45 46 static spinlock_t i2o_config_lock; 47 ··· 750 lock_kernel(); 751 switch (cmd) { 752 case I2OGETIOPS: 753 - ret = i2o_cfg_ioctl(NULL, file, cmd, arg); 754 break; 755 case I2OPASSTHRU32: 756 ret = i2o_cfg_passthru32(file, cmd, arg); ··· 983 /* 984 * IOCTL Handler 985 */ 986 - static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd, 987 - unsigned long arg) 988 { 989 int ret; 990 991 switch (cmd) { 992 case I2OGETIOPS: 993 ret = i2o_cfg_getiops(arg); ··· 1043 osm_debug("unknown ioctl called!\n"); 1044 ret = -EINVAL; 1045 } 1046 - 1047 return ret; 1048 } 1049 ··· 1117 static const struct file_operations config_fops = { 1118 .owner = THIS_MODULE, 1119 .llseek = no_llseek, 1120 - .ioctl = i2o_cfg_ioctl, 1121 #ifdef CONFIG_COMPAT 1122 .compat_ioctl = i2o_cfg_compat_ioctl, 1123 #endif
··· 40 41 #define SG_TABLESIZE 30 42 43 + static long i2o_cfg_ioctl(struct file *, unsigned int, unsigned long); 44 45 static spinlock_t i2o_config_lock; 46 ··· 751 lock_kernel(); 752 switch (cmd) { 753 case I2OGETIOPS: 754 + ret = i2o_cfg_ioctl(file, cmd, arg); 755 break; 756 case I2OPASSTHRU32: 757 ret = i2o_cfg_passthru32(file, cmd, arg); ··· 984 /* 985 * IOCTL Handler 986 */ 987 + static long i2o_cfg_ioctl(struct file *fp, unsigned int cmd, unsigned long arg) 988 { 989 int ret; 990 991 + lock_kernel(); 992 switch (cmd) { 993 case I2OGETIOPS: 994 ret = i2o_cfg_getiops(arg); ··· 1044 osm_debug("unknown ioctl called!\n"); 1045 ret = -EINVAL; 1046 } 1047 + unlock_kernel(); 1048 return ret; 1049 } 1050 ··· 1118 static const struct file_operations config_fops = { 1119 .owner = THIS_MODULE, 1120 .llseek = no_llseek, 1121 + .unlocked_ioctl = i2o_cfg_ioctl, 1122 #ifdef CONFIG_COMPAT 1123 .compat_ioctl = i2o_cfg_compat_ioctl, 1124 #endif