]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/tty/tty_io.c
tty: fix up atime/mtime mess, take three
[karo-tx-linux.git] / drivers / tty / tty_io.c
index bf9f98750f4f1de02b4c4db0e7465f7129f9e7c9..b28d6356a142c3e47dd96352d37409c9523d87fd 100644 (file)
@@ -938,10 +938,10 @@ void start_tty(struct tty_struct *tty)
 
 EXPORT_SYMBOL(start_tty);
 
+/* We limit tty time update visibility to every 8 seconds or so. */
 static void tty_update_time(struct timespec *time)
 {
-       unsigned long sec = get_seconds();
-       sec -= sec % 60;
+       unsigned long sec = get_seconds() & ~7;
        if ((long)(sec - time->tv_sec) > 0)
                time->tv_sec = sec;
 }