mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
[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>
This commit is contained in:
parent
a7ccf00718
commit
66d2173053
1 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue