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 <fweisbec@gmail.com> LKML-Reference: <1255116426-7270-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
6783b9cd71
commit
9e8ab74dda
|
@ -38,7 +38,6 @@
|
||||||
#define NVRAM_VERSION "1.3"
|
#define NVRAM_VERSION "1.3"
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
#include <linux/nvram.h>
|
#include <linux/nvram.h>
|
||||||
|
|
||||||
#define PC 1
|
#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)
|
static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
|
||||||
{
|
{
|
||||||
lock_kernel();
|
|
||||||
switch (origin) {
|
switch (origin) {
|
||||||
case 0:
|
case 0:
|
||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
|
@ -226,7 +224,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
|
||||||
offset += NVRAM_BYTES;
|
offset += NVRAM_BYTES;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
unlock_kernel();
|
|
||||||
return (offset >= 0) ? (file->f_pos = offset) : -EINVAL;
|
return (offset >= 0) ? (file->f_pos = offset) : -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue