提交 9edca64b 编写于 作者: A Arnd Bergmann 提交者: Jonathan Corbet

serio: BKL pushdown

Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 556e4b0b
......@@ -10,6 +10,7 @@
*/
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/poll.h>
#include <linux/module.h>
#include <linux/serio.h>
......@@ -81,9 +82,10 @@ static int serio_raw_open(struct inode *inode, struct file *file)
struct serio_raw_list *list;
int retval = 0;
lock_kernel();
retval = mutex_lock_interruptible(&serio_raw_mutex);
if (retval)
return retval;
goto out_bkl;
if (!(serio_raw = serio_raw_locate(iminor(inode)))) {
retval = -ENODEV;
......@@ -108,6 +110,8 @@ static int serio_raw_open(struct inode *inode, struct file *file)
out:
mutex_unlock(&serio_raw_mutex);
out_bkl:
unlock_kernel();
return retval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册