Commit 869243a0 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9cf6f4b3
...@@ -1176,17 +1176,20 @@ sector_t bmap(struct inode * inode, sector_t block) ...@@ -1176,17 +1176,20 @@ sector_t bmap(struct inode * inode, sector_t block)
EXPORT_SYMBOL(bmap); EXPORT_SYMBOL(bmap);
/** /**
* update_atime - update the access time * touch_atime - update the access time
* @mnt: mount the inode is accessed on
* @inode: inode accessed * @inode: inode accessed
* *
* Update the accessed time on an inode and mark it for writeback. * Update the accessed time on an inode and mark it for writeback.
* This function automatically handles read only file systems and media, * This function automatically handles read only file systems and media,
* as well as the "noatime" flag and inode specific "noatime" markers. * as well as the "noatime" flag and inode specific "noatime" markers.
*/ */
void update_atime(struct inode *inode) void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
{ {
struct inode *inode = dentry->d_inode;
struct timespec now; struct timespec now;
/* per-mountpoint checks will go here */
if (IS_NOATIME(inode)) if (IS_NOATIME(inode))
return; return;
if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode)) if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode))
...@@ -1201,7 +1204,7 @@ void update_atime(struct inode *inode) ...@@ -1201,7 +1204,7 @@ void update_atime(struct inode *inode)
} }
} }
EXPORT_SYMBOL(update_atime); EXPORT_SYMBOL(touch_atime);
/** /**
* file_update_time - update mtime and ctime time * file_update_time - update mtime and ctime time
......
...@@ -235,9 +235,6 @@ struct kstatfs; ...@@ -235,9 +235,6 @@ struct kstatfs;
struct vm_area_struct; struct vm_area_struct;
struct vfsmount; struct vfsmount;
/* Used to be a macro which just called the function, now just a function */
extern void update_atime (struct inode *);
extern void __init inode_init(unsigned long); extern void __init inode_init(unsigned long);
extern void __init inode_init_early(void); extern void __init inode_init_early(void);
extern void __init mnt_init(unsigned long); extern void __init mnt_init(unsigned long);
...@@ -1118,12 +1115,7 @@ static inline void mark_inode_dirty_sync(struct inode *inode) ...@@ -1118,12 +1115,7 @@ static inline void mark_inode_dirty_sync(struct inode *inode)
__mark_inode_dirty(inode, I_DIRTY_SYNC); __mark_inode_dirty(inode, I_DIRTY_SYNC);
} }
static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry) extern 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) static inline void file_accessed(struct file *file)
{ {
if (!(file->f_flags & O_NOATIME)) if (!(file->f_flags & O_NOATIME))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment