patch-2.4.0-test4 linux/drivers/block/acsi_slm.c

Next file: linux/drivers/block/ll_rw_blk.c
Previous file: linux/drivers/acpi/tables.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test3/linux/drivers/block/acsi_slm.c linux/drivers/block/acsi_slm.c
@@ -66,6 +66,7 @@
 #include <linux/mm.h>
 #include <linux/malloc.h>
 #include <linux/devfs_fs_kernel.h>
+#include <linux/smp_lock.h>
 
 #include <asm/pgtable.h>
 #include <asm/system.h>
@@ -799,10 +800,12 @@
 	device = MINOR(inode->i_rdev);
 	sip = &slm_info[device];
 
+	lock_kernel();
 	if (file->f_mode & 2)
 		sip->wbusy = 0;
 	if (file->f_mode & 1)
 		sip->rbusy = 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)