lkml.org 
[lkml]   [2009]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 12/28] 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>
Cc: John Kacur <jkacur@redhat.com>
Cc: Sven-Thorsten Dietrich <sven@thebigcorporation.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Alessio Igor Bogani <abogani@texware.it>
Cc: Greg KH <gregkh@suse.de>
LKML-Reference: <1255116426-7270-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/char/nvram.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-2.6-tip/drivers/char/nvram.c
===================================================================
--- linux-2.6-tip.orig/drivers/char/nvram.c
+++ linux-2.6-tip/drivers/char/nvram.c
@@ -38,7 +38,6 @@
#define NVRAM_VERSION "1.3"

#include <linux/module.h>
-#include <linux/smp_lock.h>
#include <linux/nvram.h>

#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 *
offset += NVRAM_BYTES;
break;
}
- unlock_kernel();
+
return (offset >= 0) ? (file->f_pos = offset) : -EINVAL;
}




\
 
 \ /
  Last update: 2009-10-10 18:15    [W:0.427 / U:4.328 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site