aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/dir.c')
-rw-r--r--fs/jffs2/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index a5e9f2205b33..9def6adf4a5d 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -588,7 +588,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
588 } 588 }
589 589
590 dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(rd->mctime)); 590 dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(rd->mctime));
591 dir_i->i_nlink++; 591 inc_nlink(dir_i);
592 592
593 jffs2_free_raw_dirent(rd); 593 jffs2_free_raw_dirent(rd);
594 594
@@ -836,7 +836,7 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
836 /* If it was a directory we moved, and there was no victim, 836 /* If it was a directory we moved, and there was no victim,
837 increase i_nlink on its new parent */ 837 increase i_nlink on its new parent */
838 if (S_ISDIR(old_dentry->d_inode->i_mode) && !victim_f) 838 if (S_ISDIR(old_dentry->d_inode->i_mode) && !victim_f)
839 new_dir_i->i_nlink++; 839 inc_nlink(new_dir_i);
840 840
841 /* Unlink the original */ 841 /* Unlink the original */
842 ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i), 842 ret = jffs2_do_unlink(c, JFFS2_INODE_INFO(old_dir_i),
@@ -848,7 +848,7 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
848 /* Oh shit. We really ought to make a single node which can do both atomically */ 848 /* Oh shit. We really ought to make a single node which can do both atomically */
849 struct jffs2_inode_info *f = JFFS2_INODE_INFO(old_dentry->d_inode); 849 struct jffs2_inode_info *f = JFFS2_INODE_INFO(old_dentry->d_inode);
850 down(&f->sem); 850 down(&f->sem);
851 old_dentry->d_inode->i_nlink++; 851 inc_nlink(old_dentry->d_inode);
852 if (f->inocache) 852 if (f->inocache)
853 f->inocache->nlink++; 853 f->inocache->nlink++;
854 up(&f->sem); 854 up(&f->sem);