mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: remove redundant timespec_equal test in update_atime()
@ 2005-08-12  9:08 Tejun Heo
  0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2005-08-12  9:08 UTC (permalink / raw)
  To: linux-kernel, viro

 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.

Signed-off-by: Tejun Heo <htejun@gmail.com>

diff --git a/fs/inode.c b/fs/inode.c
--- 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;
 	}
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-12  9:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-12  9:08 [PATCH] fs: remove redundant timespec_equal test in update_atime() Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®