jffs2 mutex problem

Keijiro Yano keijiro_yano at yahoo.co.jp
Mon Nov 14 07:55:13 EST 2005


Hi,

> Well, the patch is not against the latest MTD CVS snapshot which is bad.

Thanks for your information.
I modify my patch to fix this problem.


--- fs.c 10 Feb 2005 10:15:41 -0000 1.1.1.1
+++ fs.c 14 Nov 2005 01:59:24 -0000
@@ -236,6 +236,8 @@
  c = JFFS2_SB_INFO(inode->i_sb);
 
  jffs2_init_inode_info(f);
+
+ down(&f->sem);
  
  ret = jffs2_do_read_inode(c, f, inode->i_ino, &latest_node);
 
@@ -403,6 +405,8 @@
  f = JFFS2_INODE_INFO(inode);
  jffs2_init_inode_info(f);
 
+ down(&f->sem);
+ 
  memset(ri, 0, sizeof(*ri));
  /* Set OS-specific defaults for new inodes */
  ri->uid = cpu_to_je16(current->fsuid);

--- super.c 10 Feb 2005 10:15:41 -0000 1.1.1.1
+++ super.c 14 Nov 2005 01:36:34 -0000
@@ -51,7 +51,7 @@
 
  if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
      SLAB_CTOR_CONSTRUCTOR) {
- init_MUTEX_LOCKED(&ei->sem);
+ init_MUTEX(&ei->sem);
  inode_init_once(&ei->vfs_inode);
  }
 }

--------------------------------------
Know more about Breast Cancer
http://pr.mail.yahoo.co.jp/pinkribbon/





More information about the linux-mtd mailing list