Commit 5acd57936c3224fd86e838201e528e0169373e9b

Authored by Tejun Heo
Committed by Linus Torvalds
1 parent 6c9c0b52b8

[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>

Showing 1 changed file with 0 additions and 3 deletions Side-by-side Diff

... ... @@ -1195,9 +1195,6 @@
1195 1195 if (!timespec_equal(&inode->i_atime, &now)) {
1196 1196 inode->i_atime = now;
1197 1197 mark_inode_dirty_sync(inode);
1198   - } else {
1199   - if (!timespec_equal(&inode->i_atime, &now))
1200   - inode->i_atime = now;
1201 1198 }
1202 1199 }
1203 1200