aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/inode.c9
-rw-r--r--include/linux/fs.h10
2 files changed, 7 insertions, 12 deletions
diff --git a/fs/inode.c b/fs/inode.c
index e177769f3b41..76980a9c92e7 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1176,17 +1176,20 @@ sector_t bmap(struct inode * inode, sector_t block)
1176EXPORT_SYMBOL(bmap); 1176EXPORT_SYMBOL(bmap);
1177 1177
1178/** 1178/**
1179 * update_atime - update the access time 1179 * touch_atime - update the access time
1180 * @mnt: mount the inode is accessed on
1180 * @inode: inode accessed 1181 * @inode: inode accessed
1181 * 1182 *
1182 * Update the accessed time on an inode and mark it for writeback. 1183 * Update the accessed time on an inode and mark it for writeback.
1183 * This function automatically handles read only file systems and media, 1184 * This function automatically handles read only file systems and media,
1184 * as well as the "noatime" flag and inode specific "noatime" markers. 1185 * as well as the "noatime" flag and inode specific "noatime" markers.
1185 */ 1186 */
1186void update_atime(struct inode *inode) 1187void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
1187{ 1188{
1189 struct inode *inode = dentry->d_inode;
1188 struct timespec now; 1190 struct timespec now;
1189 1191
1192 /* per-mountpoint checks will go here */
1190 if (IS_NOATIME(inode)) 1193 if (IS_NOATIME(inode))
1191 return; 1194 return;
1192 if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode)) 1195 if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode))
@@ -1201,7 +1204,7 @@ void update_atime(struct inode *inode)
1201 } 1204 }
1202} 1205}
1203 1206
1204EXPORT_SYMBOL(update_atime); 1207EXPORT_SYMBOL(touch_atime);
1205 1208
1206/** 1209/**
1207 * file_update_time - update mtime and ctime time 1210 * file_update_time - update mtime and ctime time
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 1feee2e7e47b..85c5656756b6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -235,9 +235,6 @@ struct kstatfs;
235struct vm_area_struct; 235struct vm_area_struct;
236struct vfsmount; 236struct vfsmount;
237 237
238/* Used to be a macro which just called the function, now just a function */
239extern void update_atime (struct inode *);
240
241extern void __init inode_init(unsigned long); 238extern void __init inode_init(unsigned long);
242extern void __init inode_init_early(void); 239extern void __init inode_init_early(void);
243extern void __init mnt_init(unsigned long); 240extern void __init mnt_init(unsigned long);
@@ -1118,12 +1115,7 @@ static inline void mark_inode_dirty_sync(struct inode *inode)
1118 __mark_inode_dirty(inode, I_DIRTY_SYNC); 1115 __mark_inode_dirty(inode, I_DIRTY_SYNC);
1119} 1116}
1120 1117
1121static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry) 1118extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
1122{
1123 /* per-mountpoint checks will go here */
1124 update_atime(dentry->d_inode);
1125}
1126
1127static inline void file_accessed(struct file *file) 1119static inline void file_accessed(struct file *file)
1128{ 1120{
1129 if (!(file->f_flags & O_NOATIME)) 1121 if (!(file->f_flags & O_NOATIME))