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

From: Tejun Heo
Date: Fri Aug 12 2005 - 04:15:25 EST


Hello, Alexander Viro.

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@xxxxxxxxx>

diff --git a/fs/inode.c b/fs/inode.c
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -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;
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/