]> err.no Git - linux-2.6/commitdiff
[PATCH] Extract inode_inc_link_count(), inode_dec_link_count()
authorAlexey Dobriyan <adobriyan@gmail.com>
Thu, 23 Mar 2006 11:00:51 +0000 (03:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 15:38:15 +0000 (07:38 -0800)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/fs.h

index 8fd8d9b90b005423df250e7d72e713e2be3b73d9..f9c9dea636d0ba7be7637c6f1975c669052c58ab 100644 (file)
@@ -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)
 {