diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-03-23 03:00:51 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 07:38:15 -0800 |
commit | 66d2173053f64121f8dc69a1cf85972e37e1ee75 (patch) | |
tree | 43b67d02627e22c05e607eb9c04d03ce89751121 | |
parent | a7ccf007189aa4401695e3105b00d9429f836b46 (diff) | |
download | linux-3.10-66d2173053f64121f8dc69a1cf85972e37e1ee75.tar.gz linux-3.10-66d2173053f64121f8dc69a1cf85972e37e1ee75.tar.bz2 linux-3.10-66d2173053f64121f8dc69a1cf85972e37e1ee75.zip |
[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 8fd8d9b90b0..f9c9dea636d 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) { |