diff options
author | Alan Cox <alan@redhat.com> | 2008-05-25 23:41:40 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-25 23:41:40 -0700 |
commit | 866988edacebb6f1982266b51fc344c969f481ec (patch) | |
tree | e4e0761165d58a83372eeb8d21269d63b0d437e5 /net/wanrouter | |
parent | f3ff8a4d80e8ec867caf60b120c65db21f820e6d (diff) | |
download | linux-866988edacebb6f1982266b51fc344c969f481ec.tar.gz linux-866988edacebb6f1982266b51fc344c969f481ec.tar.bz2 linux-866988edacebb6f1982266b51fc344c969f481ec.zip |
wanrouter: Push down BKL
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wanrouter')
-rw-r--r-- | net/wanrouter/wanmain.c | 6 | ||||
-rw-r--r-- | net/wanrouter/wanproc.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index 9ab31a3ce3ad..b210a88d0960 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c @@ -350,9 +350,9 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev) * o execute requested action or pass command to the device driver */ -int wanrouter_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) +long wanrouter_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { + struct inode *inode = file->f_path.dentry->d_inode; int err = 0; struct proc_dir_entry *dent; struct wan_device *wandev; @@ -372,6 +372,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file, if (wandev->magic != ROUTER_MAGIC) return -EINVAL; + lock_kernel(); switch (cmd) { case ROUTER_SETUP: err = wanrouter_device_setup(wandev, data); @@ -403,6 +404,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file, err = wandev->ioctl(wandev, cmd, arg); else err = -EINVAL; } + unlock_kernel(); return err; } diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index 5bebe40bf4e6..267f7ff49827 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c @@ -278,7 +278,7 @@ static const struct file_operations wandev_fops = { .read = seq_read, .llseek = seq_lseek, .release = single_release, - .ioctl = wanrouter_ioctl, + .unlocked_ioctl = wanrouter_ioctl, }; /* |