From: Tejun Heo Date: Tue, 6 Sep 2005 22:17:36 +0000 (-0700) Subject: [PATCH] fs: remove redundant timespec_equal test in update_atime() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5acd57936c3224fd86e838201e528e0169373e9b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/inode.c b/fs/inode.c index e57f1724db3e..71df1b1e8f75 100644 --- 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; } }