From: Frederic Weisbecker Date: Fri, 9 Oct 2009 19:27:06 +0000 (+0200) Subject: nvram: Drop the bkl from non-generic nvram_llseek() X-Git-Tag: v2.6.33-rc1~358^2~10 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e8ab74ddaa591575f599248080a1f0d917a56ee;p=pandora-kernel.git nvram: Drop the bkl from non-generic nvram_llseek() Drop the bkl from nvram_llseek() as it obviously protects nothing. The file offset is safe in essence. Signed-off-by: Frederic Weisbecker LKML-Reference: <1255116426-7270-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Thomas Gleixner --- diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 88cee4099be9..2100a8f7bd86 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -38,7 +38,6 @@ #define NVRAM_VERSION "1.3" #include -#include #include #define PC 1 @@ -214,7 +213,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 +224,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; }