aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/dir.c
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2006-10-01 02:29:04 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:30 -0400
commitd8c76e6f45c111c32a4b3e50a2adc9210737b0d8 (patch)
tree25521b59d48c6d8c9aec1af54dbe5008ad4b215b /fs/jffs2/dir.c
parent9a53c3a783c2fa9b969628e65695c11c3e51e673 (diff)
[PATCH] r/o bind mount prepwork: inc_nlink() helper
This is mostly included for parity with dec_nlink(), where we will have some more hooks. This one should stay pretty darn straightforward for now. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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);