summaryrefslogtreecommitdiffstats
path: root/drivers/char/nvram.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-10-14 17:48:38 +0200
committerIngo Molnar <mingo@elte.hu>2009-10-14 17:54:03 +0200
commit83cb16727085b18191f45eb0ede6bf1f97d67a7a (patch)
tree5103ae4ee83c22e76f57f1a46700f074d7d51309 /drivers/char/nvram.c
parent55e858c8483af427144f33b42b818b30612b82b0 (diff)
downloadtalos-op-linux-83cb16727085b18191f45eb0ede6bf1f97d67a7a.tar.gz
talos-op-linux-83cb16727085b18191f45eb0ede6bf1f97d67a7a.zip
nvram: Drop the BKL from nvram_open()
It's safe to remove the BKL from nvram_open(): there's no open() versus read() races: nvram_init() is very simple and race-free, it registers the device then puts it into /proc - there's no state init to race with. Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <1255116426-7270-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/char/nvram.c')
-rw-r--r--drivers/char/nvram.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 2100a8f7bd86..7cf4518c030f 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -329,14 +329,12 @@ static int nvram_ioctl(struct inode *inode, struct file *file,
static int nvram_open(struct inode *inode, struct file *file)
{
- lock_kernel();
spin_lock(&nvram_state_lock);
if ((nvram_open_cnt && (file->f_flags & O_EXCL)) ||
(nvram_open_mode & NVRAM_EXCL) ||
((file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE))) {
spin_unlock(&nvram_state_lock);
- unlock_kernel();
return -EBUSY;
}
@@ -347,7 +345,6 @@ static int nvram_open(struct inode *inode, struct file *file)
nvram_open_cnt++;
spin_unlock(&nvram_state_lock);
- unlock_kernel();
return 0;
}
OpenPOWER on IntegriCloud