Skip to contentSkip to conversation

fs: remove redundant timespec_equal test in update_atime()

PATCH New Tejun Heo 1 participant 1 message Aug 12, 2005 VFS

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 fs: remove redundant timespec_equal test in update_atime()

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.

fs/inode.c +0 -3
@@ -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;
 	}
 }