[PATCH 1/5] Extract inode_inc_count(), inode_dec_count()

From: Alexey Dobriyan
Date: Tue Jan 17 2006 - 19:16:10 EST


Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---

include/linux/fs.h | 12 ++++++++++++
1 file changed, 12 insertions(+)

--- 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)
{

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/