]> git.baikalelectronics.ru Git - kernel.git/commit
fs/ufs: use ktime_get_real_seconds for sb and cg timestamps
authorArnd Bergmann <arnd@arndb.de>
Fri, 17 Aug 2018 22:43:47 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Aug 2018 23:20:27 +0000 (16:20 -0700)
commit01163fdf3dbd878b58488b2faf04866b43694a3b
tree4a8bb141028225eebeeedd329c4c1b01f6e0edc5
parent8240c4b5944bfae53e134c44cd6f3f46d702bcd0
fs/ufs: use ktime_get_real_seconds for sb and cg timestamps

get_seconds() is deprecated because of the 32-bit overflow and will be
removed.  All callers in ufs also truncate to a 32-bit number, so
nothing changes during the conversion, but this should be harmless as
the superblock and cylinder group timestamps are not visible to user
space, except for checking the fs-dirty state, wich works fine across
the overflow.

This moves the call to get_seconds() into a new inline function, with a
comment explaining the constraints, while converting it to
ktime_get_real_seconds().

Link: http://lkml.kernel.org/r/20180718115017.742609-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ufs/balloc.c
fs/ufs/ialloc.c
fs/ufs/super.c
fs/ufs/util.h