patch-2.4.0-test4 linux/drivers/char/acquirewdt.c
Next file: linux/drivers/char/agp/agpgart_fe.c
Previous file: linux/drivers/block/rd.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Wed Jul 12 21:58:42 2000
- Orig file:
v2.4.0-test3/linux/drivers/char/acquirewdt.c
- Orig date:
Fri Jun 23 21:55:08 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/char/acquirewdt.c linux/drivers/char/acquirewdt.c
@@ -38,6 +38,7 @@
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/spinlock.h>
+#include <linux/smp_lock.h>
static int acq_is_open=0;
static spinlock_t acq_lock;
@@ -140,6 +141,7 @@
static int acq_close(struct inode *inode, struct file *file)
{
+ lock_kernel();
if(MINOR(inode->i_rdev)==WATCHDOG_MINOR)
{
spin_lock(&acq_lock);
@@ -149,6 +151,7 @@
acq_is_open=0;
spin_unlock(&acq_lock);
}
+ 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)