aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9608839552b3..a516b6716870 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1396,7 +1396,21 @@ static inline void inode_dec_link_count(struct inode *inode)
1396 mark_inode_dirty(inode); 1396 mark_inode_dirty(inode);
1397} 1397}
1398 1398
1399extern void inode_inc_iversion(struct inode *inode); 1399/**
1400 * inode_inc_iversion - increments i_version
1401 * @inode: inode that need to be updated
1402 *
1403 * Every time the inode is modified, the i_version field will be incremented.
1404 * The filesystem has to be mounted with i_version flag
1405 */
1406
1407static inline void inode_inc_iversion(struct inode *inode)
1408{
1409 spin_lock(&inode->i_lock);
1410 inode->i_version++;
1411 spin_unlock(&inode->i_lock);
1412}
1413
1400extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); 1414extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
1401static inline void file_accessed(struct file *file) 1415static inline void file_accessed(struct file *file)
1402{ 1416{