Skip to content

Commit

Permalink
[PATCH] fs: remove redundant timespec_equal test in update_atime()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Sep 7, 2005
1 parent 6c9c0b5 commit 5acd579
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 5acd579

Please sign in to comment.