summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/namei.c
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2006-09-30 23:29:04 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 00:39:30 -0700
commitd8c76e6f45c111c32a4b3e50a2adc9210737b0d8 (patch)
tree25521b59d48c6d8c9aec1af54dbe5008ad4b215b /fs/ocfs2/namei.c
parent9a53c3a783c2fa9b969628e65695c11c3e51e673 (diff)
downloadop-kernel-dev-d8c76e6f45c111c32a4b3e50a2adc9210737b0d8.zip
op-kernel-dev-d8c76e6f45c111c32a4b3e50a2adc9210737b0d8.tar.gz
[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/ocfs2/namei.c')
-rw-r--r--fs/ocfs2/namei.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 40f83f5..8c370a3 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -429,7 +429,7 @@ static int ocfs2_mknod(struct inode *dir,
mlog_errno(status);
goto leave;
}
- dir->i_nlink++;
+ inc_nlink(dir);
}
status = ocfs2_add_entry(handle, dentry, inode,
@@ -730,7 +730,7 @@ static int ocfs2_link(struct dentry *old_dentry,
goto bail;
}
- inode->i_nlink++;
+ inc_nlink(inode);
inode->i_ctime = CURRENT_TIME;
fe->i_links_count = cpu_to_le16(inode->i_nlink);
fe->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
@@ -952,7 +952,7 @@ static int ocfs2_unlink(struct inode *dir,
parent_node_bh);
if (status < 0) {
mlog_errno(status);
- dir->i_nlink++;
+ inc_nlink(dir);
}
}
@@ -1382,7 +1382,7 @@ static int ocfs2_rename(struct inode *old_dir,
if (new_inode) {
new_inode->i_nlink--;
} else {
- new_dir->i_nlink++;
+ inc_nlink(new_dir);
mark_inode_dirty(new_dir);
}
}
OpenPOWER on IntegriCloud