cifs: use 64-bit timestamps for fscache
In the fscache, we just need the timestamps as cookies to check for changes, so we don't really care about the overflow, but it's better to stop using the deprecated timespec so we don't have to go through explicit conversion functions. To avoid comparing uninitialized padding values that are copied while assigning the timespec values, this rearranges the members of cifs_fscache_inode_auxdata to avoid padding, and assigns them individually. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Paulo Alcantara <palcantara@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:

committed by
Steve French

parent
95390201e7
commit
cbedeadf9c
@@ -128,8 +128,10 @@ fscache_checkaux cifs_fscache_inode_check_aux(void *cookie_netfs_data,
|
||||
|
||||
memset(&auxdata, 0, sizeof(auxdata));
|
||||
auxdata.eof = cifsi->server_eof;
|
||||
auxdata.last_write_time = timespec64_to_timespec(cifsi->vfs_inode.i_mtime);
|
||||
auxdata.last_change_time = timespec64_to_timespec(cifsi->vfs_inode.i_ctime);
|
||||
auxdata.last_write_time_sec = cifsi->vfs_inode.i_mtime.tv_sec;
|
||||
auxdata.last_change_time_sec = cifsi->vfs_inode.i_ctime.tv_sec;
|
||||
auxdata.last_write_time_nsec = cifsi->vfs_inode.i_mtime.tv_nsec;
|
||||
auxdata.last_change_time_nsec = cifsi->vfs_inode.i_ctime.tv_nsec;
|
||||
|
||||
if (memcmp(data, &auxdata, datalen) != 0)
|
||||
return FSCACHE_CHECKAUX_OBSOLETE;
|
||||
|
Reference in New Issue
Block a user