From 6cff57320275b52d0a84b616602539c79e8d7117 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 13 Jul 2018 16:31:56 +0200 Subject: ubifs: tnc: use monotonic znode timestamp The tnc uses get_seconds() based timestamps to check the age of a znode, which has two problems: on 32-bit architectures this may overflow in 2038 or 2106, and it gives incorrect information when the system time is updated using settimeofday(). Using montonic timestamps with ktime_get_seconds() solves both thes problems. Signed-off-by: Arnd Bergmann Signed-off-by: Richard Weinberger --- fs/ubifs/ubifs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ubifs/ubifs.h') diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 04bf84d71e7b..54fb6b1cd042 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h @@ -758,7 +758,7 @@ struct ubifs_znode { struct ubifs_znode *parent; struct ubifs_znode *cnext; unsigned long flags; - unsigned long time; + time64_t time; int level; int child_cnt; int iip; -- cgit v1.2.3