[PATCH] fs: remove redundant timespec_equal test in update_atime()

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>
This commit is contained in:
Tejun Heo 2005-09-06 15:17:36 -07:00 committed by Linus Torvalds
parent 6c9c0b52b8
commit 5acd57936c

View file

@ -1195,9 +1195,6 @@ void update_atime(struct inode *inode)
if (!timespec_equal(&inode->i_atime, &now)) { if (!timespec_equal(&inode->i_atime, &now)) {
inode->i_atime = now; inode->i_atime = now;
mark_inode_dirty_sync(inode); mark_inode_dirty_sync(inode);
} else {
if (!timespec_equal(&inode->i_atime, &now))
inode->i_atime = now;
} }
} }