Commit 869243a0f6143f76e7c847e707eee6ece9cbf821
Committed by
Linus Torvalds
1 parent
9cf6f4b3a3
Exists in
master
and in
4 other branches
[PATCH] remove update_atime
All callers use touch_atime now which takes a vfsmount and allows us to implement per-mount noatime. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 2 changed files with 7 additions and 12 deletions Side-by-side Diff
fs/inode.c
... | ... | @@ -1176,17 +1176,20 @@ |
1176 | 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 | 1181 | * @inode: inode accessed |
1181 | 1182 | * |
1182 | 1183 | * Update the accessed time on an inode and mark it for writeback. |
1183 | 1184 | * This function automatically handles read only file systems and media, |
1184 | 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 | 1190 | struct timespec now; |
1189 | 1191 | |
1192 | + /* per-mountpoint checks will go here */ | |
1190 | 1193 | if (IS_NOATIME(inode)) |
1191 | 1194 | return; |
1192 | 1195 | if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode)) |
... | ... | @@ -1201,7 +1204,7 @@ |
1201 | 1204 | } |
1202 | 1205 | } |
1203 | 1206 | |
1204 | -EXPORT_SYMBOL(update_atime); | |
1207 | +EXPORT_SYMBOL(touch_atime); | |
1205 | 1208 | |
1206 | 1209 | /** |
1207 | 1210 | * file_update_time - update mtime and ctime time |
include/linux/fs.h
... | ... | @@ -235,9 +235,6 @@ |
235 | 235 | struct vm_area_struct; |
236 | 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 | 238 | extern void __init inode_init(unsigned long); |
242 | 239 | extern void __init inode_init_early(void); |
243 | 240 | extern void __init mnt_init(unsigned long); |
... | ... | @@ -1118,12 +1115,7 @@ |
1118 | 1115 | __mark_inode_dirty(inode, I_DIRTY_SYNC); |
1119 | 1116 | } |
1120 | 1117 | |
1121 | -static inline 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 | - | |
1118 | +extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); | |
1127 | 1119 | static inline void file_accessed(struct file *file) |
1128 | 1120 | { |
1129 | 1121 | if (!(file->f_flags & O_NOATIME)) |