diff options
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/dir.c | 6 | ||||
-rw-r--r-- | fs/jffs2/fs.c | 6 |
2 files changed, 6 insertions, 6 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); |
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 72d9909d95ff..7bc1a4201c0c 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c | |||
@@ -277,13 +277,13 @@ void jffs2_read_inode (struct inode *inode) | |||
277 | 277 | ||
278 | for (fd=f->dents; fd; fd = fd->next) { | 278 | for (fd=f->dents; fd; fd = fd->next) { |
279 | if (fd->type == DT_DIR && fd->ino) | 279 | if (fd->type == DT_DIR && fd->ino) |
280 | inode->i_nlink++; | 280 | inc_nlink(inode); |
281 | } | 281 | } |
282 | /* and '..' */ | 282 | /* and '..' */ |
283 | inode->i_nlink++; | 283 | inc_nlink(inode); |
284 | /* Root dir gets i_nlink 3 for some reason */ | 284 | /* Root dir gets i_nlink 3 for some reason */ |
285 | if (inode->i_ino == 1) | 285 | if (inode->i_ino == 1) |
286 | inode->i_nlink++; | 286 | inc_nlink(inode); |
287 | 287 | ||
288 | inode->i_op = &jffs2_dir_inode_operations; | 288 | inode->i_op = &jffs2_dir_inode_operations; |
289 | inode->i_fop = &jffs2_dir_operations; | 289 | inode->i_fop = &jffs2_dir_operations; |