From 2d863e92ec1b1deb8167d7f5266f754f258e876a Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Thu, 15 May 2008 11:16:21 -0600 Subject: [PATCH] viotape: cdev lock_kernel pushdown () Signed-off-by: Jonathan Corbet --- drivers/char/viotape.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 58aad638..af03d27 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -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! */ @@ -717,6 +719,7 @@ static int viotap_open(struct inode *inode, struct file *file) free_op: free_op_struct(op); + unlock_kernel(); return ret; } -- 2.7.4