Skip to content

Commit

Permalink
viotape: cdev lock_kernel pushdown ()
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 309c455 commit 2d863e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/char/viotape.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <linux/completion.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>
#include <asm/ioctls.h>
Expand Down Expand Up @@ -687,6 +688,7 @@ static int viotap_open(struct inode *inode, struct file *file)
if (op == NULL)
return -ENOMEM;

lock_kernel()
get_dev_info(file->f_path.dentry->d_inode, &devi);

/* Note: We currently only support one mode! */
Expand Down Expand Up @@ -717,6 +719,7 @@ static int viotap_open(struct inode *inode, struct file *file)

free_op:
free_op_struct(op);
unlock_kernel();
return ret;
}

Expand Down

0 comments on commit 2d863e9

Please sign in to comment.