summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@zip.com.au>2002-06-17 20:17:48 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-06-17 20:17:48 -0700
commit386b1f7440e90f1b1541fc4db4dfcd34b00ccd96 (patch)
tree0f565569548137c3ec47803caf9bdbcfafe86257
parentafb51f819b777e9650470e066450d5f887483b19 (diff)
[PATCH] update_atime cleanup
Remove unneeded do_update_atime(), and convert update_atime() to C.
-rw-r--r--fs/inode.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/fs/inode.c b/fs/inode.c
index bc90e4232713..a3b2cd4e8a3c 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -913,16 +913,6 @@ int bmap(struct inode * inode, int block)
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
* @inode: inode accessed
@@ -932,15 +922,19 @@ static inline void do_atime_update(struct inode *inode)
* 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)
return;
- if ( IS_NOATIME (inode) ) return;
- if ( IS_NODIRATIME (inode) && S_ISDIR (inode->i_mode) ) return;
- if ( IS_RDONLY (inode) ) return;
- do_atime_update(inode);
-} /* End Function update_atime */
+ if (IS_NOATIME(inode))
+ return;
+ if (IS_NODIRATIME(inode) && S_ISDIR(inode->i_mode))
+ return;
+ if (IS_RDONLY(inode))
+ return;
+ inode->i_atime = CURRENT_TIME;
+ mark_inode_dirty_sync(inode);
+}
int inode_needs_sync(struct inode *inode)
{