summaryrefslogtreecommitdiffstats
path: root/fs/nfs/fscache.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-11-11 21:16:25 +0100
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-01-15 10:54:30 -0500
commitbc35b6b0cf4a83da5015ae8f1aa072a05586ee84 (patch)
treede9eb4fd30de3e2368faaaff58c7256081dbd6f2 /fs/nfs/fscache.h
parentae08483cdd666045b60ceb502dcbf30038334d58 (diff)
downloadlinux-stable-bc35b6b0cf4a83da5015ae8f1aa072a05586ee84.tar.gz
linux-stable-bc35b6b0cf4a83da5015ae8f1aa072a05586ee84.tar.bz2
linux-stable-bc35b6b0cf4a83da5015ae8f1aa072a05586ee84.zip
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>
Diffstat (limited to 'fs/nfs/fscache.h')
-rw-r--r--fs/nfs/fscache.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h
index ad041cfbf9ec..6754c8607230 100644
--- a/fs/nfs/fscache.h
+++ b/fs/nfs/fscache.h
@@ -62,9 +62,11 @@ struct nfs_fscache_key {
* cache object.
*/
struct nfs_fscache_inode_auxdata {
- struct timespec mtime;
- struct timespec ctime;
- u64 change_attr;
+ s64 mtime_sec;
+ s64 mtime_nsec;
+ s64 ctime_sec;
+ s64 ctime_nsec;
+ u64 change_attr;
};
/*