Skip to content

Commit

Permalink
wanrouter: Push down BKL
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alan Cox authored and David S. Miller committed May 26, 2008
1 parent f3ff8a4 commit 866988e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions net/wanrouter/wanmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion net/wanrouter/wanproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

/*
Expand Down

0 comments on commit 866988e

Please sign in to comment.