Skip to content

Commit

Permalink
[PATCH] Extract inode_inc_link_count(), inode_dec_link_count()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Mar 23, 2006
1 parent a7ccf00 commit 66d2173
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 66d2173

Please sign in to comment.