patch-2.4.0-test4 linux/drivers/sbus/char/jsflash.c

Next file: linux/drivers/sbus/char/pcikbd.c
Previous file: linux/drivers/sbus/char/flash.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test3/linux/drivers/sbus/char/jsflash.c linux/drivers/sbus/char/jsflash.c
@@ -35,6 +35,7 @@
 #include <linux/poll.h>
 #include <linux/init.h>
 #include <linux/string.h>
+#include <linux/smp_lock.h>
 
 /*
  * <linux/blk.h> is controlled from the outside with these definitions.
@@ -504,7 +505,9 @@
 
 static int jsf_release(struct inode *inode, struct file *file)
 {
+	lock_kernel();
 	jsf0.busy = 0;
+	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)