aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-03-23 06:00:51 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:15 -0500
commit66d2173053f64121f8dc69a1cf85972e37e1ee75 (patch)
tree43b67d02627e22c05e607eb9c04d03ce89751121 /include/linux/fs.h
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>
Diffstat (limited to 'include/linux/fs.h')
-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)
1115 __mark_inode_dirty(inode, I_DIRTY_SYNC); 1115 __mark_inode_dirty(inode, I_DIRTY_SYNC);
1116} 1116}
1117 1117
1118static inline void inode_inc_link_count(struct inode *inode)
1119{
1120 inode->i_nlink++;
1121 mark_inode_dirty(inode);
1122}
1123
1124static inline void inode_dec_link_count(struct inode *inode)
1125{
1126 inode->i_nlink--;
1127 mark_inode_dirty(inode);
1128}
1129
1118extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); 1130extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
1119static inline void file_accessed(struct file *file) 1131static inline void file_accessed(struct file *file)
1120{ 1132{