mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
[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:
parent
6c9c0b52b8
commit
5acd57936c
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user