aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/fs.c')
-rw-r--r--fs/jffs2/fs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 543420665c5b..d0fcc5f3497e 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -234,6 +234,7 @@ void jffs2_read_inode (struct inode *inode)
234 c = JFFS2_SB_INFO(inode->i_sb); 234 c = JFFS2_SB_INFO(inode->i_sb);
235 235
236 jffs2_init_inode_info(f); 236 jffs2_init_inode_info(f);
237 down(&f->sem);
237 238
238 ret = jffs2_do_read_inode(c, f, inode->i_ino, &latest_node); 239 ret = jffs2_do_read_inode(c, f, inode->i_ino, &latest_node);
239 240
@@ -400,6 +401,7 @@ struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_i
400 401
401 f = JFFS2_INODE_INFO(inode); 402 f = JFFS2_INODE_INFO(inode);
402 jffs2_init_inode_info(f); 403 jffs2_init_inode_info(f);
404 down(&f->sem);
403 405
404 memset(ri, 0, sizeof(*ri)); 406 memset(ri, 0, sizeof(*ri));
405 /* Set OS-specific defaults for new inodes */ 407 /* Set OS-specific defaults for new inodes */