diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-07-13 16:27:44 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2018-11-30 16:00:58 +0000 |
commit | 34e06fe4d05bd120556a95d5ebf1bcc97b0a1ca0 (patch) | |
tree | 46c49be455c1154616f49b177fc8063558e4f883 /lib/gen_crc64table.c | |
parent | b7e768b7e3522695ed36dcb48ecdcd344bd30a9b (diff) |
cachefiles: avoid deprecated get_seconds()
get_seconds() returns an unsigned long can overflow on some architectures
and is deprecated because of that. In cachefs, we cast that number to
a a 32-bit integer, which will overflow in year 2106 on all architectures.
As confirmed by David Howells, the overflow probably isn't harmful
in the end, since the timestamps are only used to make the file names
unique, but they don't strictly have to be in monotonically increasing
order since the files only exist in order to be deleted as quickly
as possible.
Moving to ktime_get_real_seconds() avoids the deprecated interface.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'lib/gen_crc64table.c')
0 files changed, 0 insertions, 0 deletions