[PATCH] fs: remove redundant timespec_equal test in update_atime()
authorTejun Heo <htejun@gmail.com>
Tue, 6 Sep 2005 22:17:36 +0000 (15:17 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:31 +0000 (16:57 -0700)
In update_atime(), timespec_equal() test is done twice in succession and
the second is always false.  This patch removes the second test.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/inode.c

index e57f172..71df1b1 100644 (file)
@@ -1195,9 +1195,6 @@ void update_atime(struct inode *inode)
        if (!timespec_equal(&inode->i_atime, &now)) {
                inode->i_atime = now;
                mark_inode_dirty_sync(inode);
-       } else {
-               if (!timespec_equal(&inode->i_atime, &now))
-                       inode->i_atime = now;
        }
 }