diff options
author | Christoph Hellwig <hch@lst.de> | 2006-01-09 23:52:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:31 -0500 |
commit | 869243a0f6143f76e7c847e707eee6ece9cbf821 (patch) | |
tree | bf14139c86988c40aa10587834141859049ec890 | |
parent | 9cf6f4b3a3d24d8a41515b509b8fb6448f9201e9 (diff) |
[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>
-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)) |