i2o: fasync BKL pushdown

This driver appears to really need the BKL to protect open_files.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Jonathan Corbet 2008-06-19 15:44:57 -06:00
parent b7e3e1fbf6
commit 743115ee05

View File

@ -1084,15 +1084,17 @@ static int cfg_fasync(int fd, struct file *fp, int on)
{ {
ulong id = (ulong) fp->private_data; ulong id = (ulong) fp->private_data;
struct i2o_cfg_info *p; struct i2o_cfg_info *p;
int ret = -EBADF;
lock_kernel();
for (p = open_files; p; p = p->next) for (p = open_files; p; p = p->next)
if (p->q_id == id) if (p->q_id == id)
break; break;
if (!p) if (p)
return -EBADF; ret = fasync_helper(fd, fp, on, &p->fasync);
unlock_kernel();
return fasync_helper(fd, fp, on, &p->fasync); return ret;
} }
static int cfg_release(struct inode *inode, struct file *file) static int cfg_release(struct inode *inode, struct file *file)