aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-05-27 15:56:54 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-05-28 12:24:15 -0400
commitb170204ddb7844ffff62d2d537b20c0eeb97725e (patch)
treebd7ce6426789c1b1cb6fbcb1ecd2de3adc78c008 /arch
parent32561696c23028596f24b353d98f2e23b58f91f7 (diff)
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: Andi Kleen <ak@linux.intel.com> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 18d505d8022..8ab28368bb9 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -13,7 +13,6 @@
13#include <linux/ratelimit.h> 13#include <linux/ratelimit.h>
14#include <linux/kallsyms.h> 14#include <linux/kallsyms.h>
15#include <linux/rcupdate.h> 15#include <linux/rcupdate.h>
16#include <linux/smp_lock.h>
17#include <linux/kobject.h> 16#include <linux/kobject.h>
18#include <linux/kdebug.h> 17#include <linux/kdebug.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
@@ -791,12 +790,10 @@ static int open_exclu; /* already open exclusive? */
791 790
792static int mce_open(struct inode *inode, struct file *file) 791static int mce_open(struct inode *inode, struct file *file)
793{ 792{
794 lock_kernel();
795 spin_lock(&mce_state_lock); 793 spin_lock(&mce_state_lock);
796 794
797 if (open_exclu || (open_count && (file->f_flags & O_EXCL))) { 795 if (open_exclu || (open_count && (file->f_flags & O_EXCL))) {
798 spin_unlock(&mce_state_lock); 796 spin_unlock(&mce_state_lock);
799 unlock_kernel();
800 797
801 return -EBUSY; 798 return -EBUSY;
802 } 799 }
@@ -806,7 +803,6 @@ static int mce_open(struct inode *inode, struct file *file)
806 open_count++; 803 open_count++;
807 804
808 spin_unlock(&mce_state_lock); 805 spin_unlock(&mce_state_lock);
809 unlock_kernel();
810 806
811 return nonseekable_open(inode, file); 807 return nonseekable_open(inode, file);
812} 808}