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>
This commit is contained in:
@@ -40,8 +40,7 @@
|
|||||||
|
|
||||||
#define SG_TABLESIZE 30
|
#define SG_TABLESIZE 30
|
||||||
|
|
||||||
static int i2o_cfg_ioctl(struct inode *, struct file *, unsigned int,
|
static long i2o_cfg_ioctl(struct file *, unsigned int, unsigned long);
|
||||||
unsigned long);
|
|
||||||
|
|
||||||
static spinlock_t i2o_config_lock;
|
static spinlock_t i2o_config_lock;
|
||||||
|
|
||||||
@@ -751,7 +750,7 @@ static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,
|
|||||||
lock_kernel();
|
lock_kernel();
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case I2OGETIOPS:
|
case I2OGETIOPS:
|
||||||
ret = i2o_cfg_ioctl(NULL, file, cmd, arg);
|
ret = i2o_cfg_ioctl(file, cmd, arg);
|
||||||
break;
|
break;
|
||||||
case I2OPASSTHRU32:
|
case I2OPASSTHRU32:
|
||||||
ret = i2o_cfg_passthru32(file, cmd, arg);
|
ret = i2o_cfg_passthru32(file, cmd, arg);
|
||||||
@@ -984,11 +983,11 @@ out:
|
|||||||
/*
|
/*
|
||||||
* IOCTL Handler
|
* IOCTL Handler
|
||||||
*/
|
*/
|
||||||
static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd,
|
static long i2o_cfg_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
|
||||||
unsigned long arg)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case I2OGETIOPS:
|
case I2OGETIOPS:
|
||||||
ret = i2o_cfg_getiops(arg);
|
ret = i2o_cfg_getiops(arg);
|
||||||
@@ -1044,7 +1043,7 @@ static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd,
|
|||||||
osm_debug("unknown ioctl called!\n");
|
osm_debug("unknown ioctl called!\n");
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
|
unlock_kernel();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1118,7 +1117,7 @@ static int cfg_release(struct inode *inode, struct file *file)
|
|||||||
static const struct file_operations config_fops = {
|
static const struct file_operations config_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.ioctl = i2o_cfg_ioctl,
|
.unlocked_ioctl = i2o_cfg_ioctl,
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
.compat_ioctl = i2o_cfg_compat_ioctl,
|
.compat_ioctl = i2o_cfg_compat_ioctl,
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user