提交 b170204d 编写于 作者: A Andi Kleen 提交者: H. Peter Anvin

x86, mce: drop BKL in mce_open

BKL is not needed for anything in mce_open because it has
an own spinlock. Remove it.

[ Impact: cleanup ]
Signed-off-by: NAndi Kleen <ak@linux.intel.com>
Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
上级 32561696
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/ratelimit.h> #include <linux/ratelimit.h>
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/smp_lock.h>
#include <linux/kobject.h> #include <linux/kobject.h>
#include <linux/kdebug.h> #include <linux/kdebug.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -791,12 +790,10 @@ static int open_exclu; /* already open exclusive? */ ...@@ -791,12 +790,10 @@ static int open_exclu; /* already open exclusive? */
static int mce_open(struct inode *inode, struct file *file) static int mce_open(struct inode *inode, struct file *file)
{ {
lock_kernel();
spin_lock(&mce_state_lock); spin_lock(&mce_state_lock);
if (open_exclu || (open_count && (file->f_flags & O_EXCL))) { if (open_exclu || (open_count && (file->f_flags & O_EXCL))) {
spin_unlock(&mce_state_lock); spin_unlock(&mce_state_lock);
unlock_kernel();
return -EBUSY; return -EBUSY;
} }
...@@ -806,7 +803,6 @@ static int mce_open(struct inode *inode, struct file *file) ...@@ -806,7 +803,6 @@ static int mce_open(struct inode *inode, struct file *file)
open_count++; open_count++;
spin_unlock(&mce_state_lock); spin_unlock(&mce_state_lock);
unlock_kernel();
return nonseekable_open(inode, file); return nonseekable_open(inode, file);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册