]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: fscache: use timespec64 in inode auxdata
authorArnd Bergmann <arnd@arndb.de>
Mon, 11 Nov 2019 20:16:25 +0000 (21:16 +0100)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:54:30 +0000 (10:54 -0500)
commit635303b8192ae456ebe8a58e1581e30156e0bb03
treede9eb4fd30de3e2368faaaff58c7256081dbd6f2
parentf46d8ca3752ab69b0362a45fda5c81d1bb862353
nfs: fscache: use timespec64 in inode auxdata

nfs currently behaves differently on 32-bit and 64-bit kernels regarding
the on-disk format of nfs_fscache_inode_auxdata.

That format should really be the same on any kernel, and we should avoid
the 'timespec' type in order to remove that from the kernel later on.

Using plain 'timespec64' would not be good here, since that includes
implied padding and would possibly leak kernel stack data to the on-disk
format on 32-bit architectures.

struct __kernel_timespec would work as a replacement, but open-coding
the two struct members in nfs_fscache_inode_auxdata makes it more
obvious what's going on here, and keeps the current format for 64-bit
architectures.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/fscache-index.c
fs/nfs/fscache.c
fs/nfs/fscache.h