mtd/fs/jffs2 super-v24.c,1.83,1.84

Artem Bityuckiy dedekind at infradead.org
Wed Jul 20 10:21:47 EDT 2005


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv15532

Modified Files:
	super-v24.c 
Log Message:
[JFFS2] Initialize c->'s locks.

Port the corresponding fix from 2.6's super.c


Index: super-v24.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/super-v24.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- super-v24.c	9 Feb 2005 09:23:54 -0000	1.83
+++ super-v24.c	20 Jul 2005 14:21:40 -0000	1.84
@@ -59,6 +59,15 @@
 	c = JFFS2_SB_INFO(sb);
 	memset(c, 0, sizeof(*c));
 
+	/* Initialize JFFS2 superblock locks now, the further superblock
+	 * initialization will be done later */
+	init_MUTEX(&c->alloc_sem);
+	init_MUTEX(&c->erase_free_sem);
+	init_waitqueue_head(&c->erase_wait);
+	init_waitqueue_head(&c->inocache_wq);
+	spin_lock_init(&c->erase_completion_lock);
+	spin_lock_init(&c->inocache_lock);
+
 	sb->s_op = &jffs2_super_operations;
 
 	c->mtd = get_mtd_device(NULL, minor(sb->s_dev));





More information about the linux-mtd-cvs mailing list