diff options
-rw-r--r-- | fs/inode.c | 9 | ||||
-rw-r--r-- | include/linux/fs.h | 10 |
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) | |||
1176 | EXPORT_SYMBOL(bmap); | 1176 | EXPORT_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 | */ |
1186 | void update_atime(struct inode *inode) | 1187 | void 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 | ||
1204 | EXPORT_SYMBOL(update_atime); | 1207 | EXPORT_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; | |||
235 | struct vm_area_struct; | 235 | struct vm_area_struct; |
236 | struct vfsmount; | 236 | struct vfsmount; |
237 | 237 | ||
238 | /* Used to be a macro which just called the function, now just a function */ | ||
239 | extern void update_atime (struct inode *); | ||
240 | |||
241 | extern void __init inode_init(unsigned long); | 238 | extern void __init inode_init(unsigned long); |
242 | extern void __init inode_init_early(void); | 239 | extern void __init inode_init_early(void); |
243 | extern void __init mnt_init(unsigned long); | 240 | extern 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 | ||
1121 | static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry) | 1118 | extern 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 | |||
1127 | static inline void file_accessed(struct file *file) | 1119 | static inline void file_accessed(struct file *file) |
1128 | { | 1120 | { |
1129 | if (!(file->f_flags & O_NOATIME)) | 1121 | if (!(file->f_flags & O_NOATIME)) |