patch-2.4.0-test4 linux/fs/openpromfs/inode.c

Next file: linux/fs/partitions/Makefile
Previous file: linux/fs/nfsd/vfs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test3/linux/fs/openpromfs/inode.c linux/fs/openpromfs/inode.c
@@ -13,6 +13,7 @@
 #include <linux/locks.h>
 #include <linux/init.h>
 #include <linux/malloc.h>
+#include <linux/smp_lock.h>
 
 #include <asm/openprom.h>
 #include <asm/oplib.h>
@@ -507,6 +508,7 @@
 	
 	if (!op)
 		return 0;
+	lock_kernel();
 	node = nodes[(u16)((long)inode->u.generic_ip)].node;
 	if ((u16)((long)inode->u.generic_ip) == aliases) {
 		if ((op->flag & OPP_DIRTY) && (op->flag & OPP_STRING)) {
@@ -548,6 +550,7 @@
 				op->name);
 		}
 	}
+	unlock_kernel();
 	kfree (filp->private_data);
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)