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

ocfs2-stack_user: BKL pushdown

Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 930ab4e5
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/smp_lock.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -619,10 +620,12 @@ static int ocfs2_control_open(struct inode *inode, struct file *file) ...@@ -619,10 +620,12 @@ static int ocfs2_control_open(struct inode *inode, struct file *file)
return -ENOMEM; return -ENOMEM;
p->op_this_node = -1; p->op_this_node = -1;
lock_kernel();
mutex_lock(&ocfs2_control_lock); mutex_lock(&ocfs2_control_lock);
file->private_data = p; file->private_data = p;
list_add(&p->op_list, &ocfs2_control_private_list); list_add(&p->op_list, &ocfs2_control_private_list);
mutex_unlock(&ocfs2_control_lock); mutex_unlock(&ocfs2_control_lock);
unlock_kernel();
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册