Skip to content

Commit

Permalink
x86, mce: drop BKL in mce_open
Browse files Browse the repository at this point in the history
BKL is not needed for anything in mce_open because it has
an own spinlock. Remove it.

[ Impact: cleanup ]

Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Hidetoshi Seto <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
  • Loading branch information
Andi Kleen authored and H. Peter Anvin committed May 28, 2009
1 parent 3256169 commit b170204
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/ratelimit.h>
#include <linux/kallsyms.h>
#include <linux/rcupdate.h>
#include <linux/smp_lock.h>
#include <linux/kobject.h>
#include <linux/kdebug.h>
#include <linux/kernel.h>
Expand Down Expand Up @@ -791,12 +790,10 @@ static int open_exclu; /* already open exclusive? */

static int mce_open(struct inode *inode, struct file *file)
{
lock_kernel();
spin_lock(&mce_state_lock);

if (open_exclu || (open_count && (file->f_flags & O_EXCL))) {
spin_unlock(&mce_state_lock);
unlock_kernel();

return -EBUSY;
}
Expand All @@ -806,7 +803,6 @@ static int mce_open(struct inode *inode, struct file *file)
open_count++;

spin_unlock(&mce_state_lock);
unlock_kernel();

return nonseekable_open(inode, file);
}
Expand Down

0 comments on commit b170204

Please sign in to comment.