ubifs: tnc: use monotonic znode timestamp
authorArnd Bergmann <arnd@arndb.de>
Fri, 13 Jul 2018 14:31:56 +0000 (16:31 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 14 Aug 2018 22:06:16 +0000 (00:06 +0200)
commit6cff57320275b52d0a84b616602539c79e8d7117
tree66beabeb0cf9d2ddfea68d362d4eebd051cd3de7
parent0eca0b8067c4dfa405e38abb4c3a87b1df14513c
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 <arnd@arndb.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/shrinker.c
fs/ubifs/tnc.c
fs/ubifs/tnc_misc.c
fs/ubifs/ubifs.h