diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-03-23 06:00:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 10:38:15 -0500 |
commit | 66d2173053f64121f8dc69a1cf85972e37e1ee75 (patch) | |
tree | 43b67d02627e22c05e607eb9c04d03ce89751121 | |
parent | a7ccf007189aa4401695e3105b00d9429f836b46 (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.h | 12 |
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 | ||
1118 | static inline void inode_inc_link_count(struct inode *inode) | ||
1119 | { | ||
1120 | inode->i_nlink++; | ||
1121 | mark_inode_dirty(inode); | ||
1122 | } | ||
1123 | |||
1124 | static inline void inode_dec_link_count(struct inode *inode) | ||
1125 | { | ||
1126 | inode->i_nlink--; | ||
1127 | mark_inode_dirty(inode); | ||
1128 | } | ||
1129 | |||
1118 | extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); | 1130 | extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); |
1119 | static inline void file_accessed(struct file *file) | 1131 | static inline void file_accessed(struct file *file) |
1120 | { | 1132 | { |