提交 5794e1b1 编写于 作者: J Jonathan Corbet

dvb: cdev lock_kernel() pushdown

Signed-off-by: NJonathan Corbet <corbet@lwn.net>
上级 20613f24
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/cdev.h> #include <linux/cdev.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/smp_lock.h>
#include "dvbdev.h" #include "dvbdev.h"
static int dvbdev_debug; static int dvbdev_debug;
...@@ -74,6 +75,7 @@ static int dvb_device_open(struct inode *inode, struct file *file) ...@@ -74,6 +75,7 @@ static int dvb_device_open(struct inode *inode, struct file *file)
{ {
struct dvb_device *dvbdev; struct dvb_device *dvbdev;
lock_kernel();
dvbdev = dvbdev_find_device (iminor(inode)); dvbdev = dvbdev_find_device (iminor(inode));
if (dvbdev && dvbdev->fops) { if (dvbdev && dvbdev->fops) {
...@@ -90,8 +92,10 @@ static int dvb_device_open(struct inode *inode, struct file *file) ...@@ -90,8 +92,10 @@ static int dvb_device_open(struct inode *inode, struct file *file)
file->f_op = fops_get(old_fops); file->f_op = fops_get(old_fops);
} }
fops_put(old_fops); fops_put(old_fops);
unlock_kernel();
return err; return err;
} }
unlock_kernel();
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册