patch-2.4.0-test4 linux/drivers/char/nvram.c
Next file: linux/drivers/char/pc110pad.c
Previous file: linux/drivers/char/msp3400.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Wed Jul 12 21:58:42 2000
- Orig file:
v2.4.0-test3/linux/drivers/char/nvram.c
- Orig date:
Mon Jul 10 16:47:22 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/char/nvram.c linux/drivers/char/nvram.c
@@ -34,6 +34,8 @@
#include <linux/module.h>
#include <linux/config.h>
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
#define PC 1
#define ATARI 2
@@ -341,11 +343,13 @@
static int nvram_release( struct inode *inode, struct file *file )
{
+ lock_kernel();
nvram_open_cnt--;
if (file->f_flags & O_EXCL)
nvram_open_mode &= ~NVRAM_EXCL;
if (file->f_mode & 2)
nvram_open_mode &= ~NVRAM_WRITE;
+ unlock_kernel();
return( 0 );
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)