[PATCH] nvram: Drop the bkl from non-generic nvram_llseek()

From: Frederic Weisbecker
Date: Fri Oct 09 2009 - 15:28:36 EST


Drop the bkl from nvram_llseek() as it obviously protects nothing.
The file offset is safe in essence.

Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: John Kacur <jkacur@xxxxxxxxxx>
Cc: Sven-Thorsten Dietrich <sven@xxxxxxxxxxxxxxxxxxxxx>
Cc: Jonathan Corbet <corbet@xxxxxxx>
Cc: Alessio Igor Bogani <abogani@xxxxxxxxxx>
Cc: Greg KH <gregkh@xxxxxxx>
---
drivers/char/nvram.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index b2a7eaf..d1e3987 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -214,7 +214,6 @@ void nvram_set_checksum(void)

static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
{
- lock_kernel();
switch (origin) {
case 0:
/* nothing to do */
@@ -226,7 +225,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
offset += NVRAM_BYTES;
break;
}
- unlock_kernel();
+
return (offset >= 0) ? (file->f_pos = offset) : -EINVAL;
}

--
1.6.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/