aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dobriyan2006-03-23 03:00:51 -0800
committerLinus Torvalds2006-03-23 07:38:15 -0800
commit66d2173053f64121f8dc69a1cf85972e37e1ee75 (patch)
tree43b67d02627e22c05e607eb9c04d03ce89751121
parenta7ccf007189aa4401695e3105b00d9429f836b46 (diff)
[PATCH] Extract inode_inc_link_count(), inode_dec_link_count()
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/fs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8fd8d9b90b00..f9c9dea636d0 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1115,6 +1115,18 @@ static inline void mark_inode_dirty_sync(struct inode *inode)
__mark_inode_dirty(inode, I_DIRTY_SYNC);
}
+static inline void inode_inc_link_count(struct inode *inode)
+{
+ inode->i_nlink++;
+ mark_inode_dirty(inode);
+}
+
+static inline void inode_dec_link_count(struct inode *inode)
+{
+ inode->i_nlink--;
+ mark_inode_dirty(inode);
+}
+
extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
static inline void file_accessed(struct file *file)
{