summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-03-18 05:39:05 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2004-03-18 05:39:05 -0800
commitdf8781b5290d04108861e1bd0525ed01379a6b63 (patch)
treee6e3c3141cde8e94207435db22d92253edd47b57 /include/linux
parent5f9861a66ce697389ea89236902ef6ef5f54225b (diff)
[PATCH] add touch_atime() helper
Preparation for per-mountpoint noatime, nodiratime and later - per-mountpoint r/o. Depends on file_accessed() patch, should go after it. New helper - touch_atime(mnt, dentry). It's a wrapper for update_atime() and that's where all future per-mountpoint checks will go.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c069102db207..9c609f4febbc 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -914,9 +914,15 @@ static inline void mark_inode_dirty_sync(struct inode *inode)
__mark_inode_dirty(inode, I_DIRTY_SYNC);
}
+static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
+{
+ /* per-mountpoint checks will go here */
+ update_atime(dentry->d_inode);
+}
+
static inline void file_accessed(struct file *file)
{
- update_atime(file->f_dentry->d_inode);
+ touch_atime(file->f_vfsmnt, file->f_dentry);
}