Commit 386b1f74 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] update_atime cleanup

Remove unneeded do_update_atime(), and convert update_atime() to C.
parent afb51f81
...@@ -913,16 +913,6 @@ int bmap(struct inode * inode, int block) ...@@ -913,16 +913,6 @@ int bmap(struct inode * inode, int block)
return res; return res;
} }
static inline void do_atime_update(struct inode *inode)
{
unsigned long time = CURRENT_TIME;
if (inode->i_atime != time) {
inode->i_atime = time;
mark_inode_dirty_sync(inode);
}
}
/** /**
* update_atime - update the access time * update_atime - update the access time
* @inode: inode accessed * @inode: inode accessed
...@@ -932,15 +922,19 @@ static inline void do_atime_update(struct inode *inode) ...@@ -932,15 +922,19 @@ static inline void do_atime_update(struct inode *inode)
* 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 update_atime(struct inode *inode)
{ {
if (inode->i_atime == CURRENT_TIME) if (inode->i_atime == CURRENT_TIME)
return; return;
if ( IS_NOATIME (inode) ) return; if (IS_NOATIME(inode))
if ( IS_NODIRATIME (inode) && S_ISDIR (inode->i_mode) ) return; return;
if ( IS_RDONLY (inode) ) return; if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode))
do_atime_update(inode); return;
} /* End Function update_atime */ if (IS_RDONLY(inode))
return;
inode->i_atime = CURRENT_TIME;
mark_inode_dirty_sync(inode);
}
int inode_needs_sync(struct inode *inode) int inode_needs_sync(struct inode *inode)
{ {
......
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