Message ID | 20060118003453.GB24835@mipter.zuzino.mipt.ru |
---|---|
State | New, archived |
Headers | show |
Series |
|
Related | show |
Alexey Dobriyan <adobriyan@gmail.com> wrote: > > +static inline void inode_inc_count(struct inode *inode) > +{ > + inode->i_nlink++; > + mark_inode_dirty(inode); > +} hm, OK. I think I'll switch these all to inode_inc_link_count(), to clearly distinguish them from the various functions which diddle ->i_count. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
--- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1112,6 +1112,18 @@ static inline void mark_inode_dirty_sync __mark_inode_dirty(inode, I_DIRTY_SYNC); } +static inline void inode_inc_count(struct inode *inode) +{ + inode->i_nlink++; + mark_inode_dirty(inode); +} + +static inline void inode_dec_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) {
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> --- include/linux/fs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/