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