From: Alexey Dobriyan Date: Thu, 23 Mar 2006 11:00:51 +0000 (-0800) Subject: [PATCH] Extract inode_inc_link_count(), inode_dec_link_count() X-Git-Tag: v2.6.17-rc1~1020 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66d2173053f64121f8dc69a1cf85972e37e1ee75;p=linux-2.6 [PATCH] Extract inode_inc_link_count(), inode_dec_link_count() Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/fs.h b/include/linux/fs.h index 8fd8d9b90b..f9c9dea636 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) {