lkml.org 
[lkml]   [2018]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] cachefiles: avoid deprecated get_seconds()
Date
Arnd Bergmann <arnd@arndb.de> wrote:

> - sprintf(nbuffer, "%08x%08x",
> - (uint32_t) get_seconds(),
> + sprintf(nbuffer, "%08llx%08x",
> + (uint64_t) ktime_get_real_seconds(),

It's not necessary to expand the 'time' field of the name. It's not
interpreted by userspace, it's just there to prevent collisions when moving
directories about. If your cache goes weird in the future because there was a
collision with an object that was moved to the graveyard 68 years ago and not
cleaned up, then that's probably a bug in cachefilesd.

But I've no objection to using ktime_get_real_seconds() and truncating the
value.

David

\
 
 \ /
  Last update: 2018-06-20 12:58    [W:0.041 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site