diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-10-31 15:14:03 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2019-12-19 17:46:08 -0500 |
commit | e4598e38ee7e708d751081799f27d3f11a3e687d (patch) | |
tree | b25a6ff8bd20d6f7f572b36211e9f8f9e44828c4 /fs | |
parent | 92c5e46911c0c1b20fa2294298aaf008c3afe975 (diff) |
nfsd: use timespec64 in encode_time_delta
The values in encode_time_delta are always small and don't
overflow the range of 'struct timespec', so changing it has
no effect.
Change it to timespec64 as a prerequisite for removing the
timespec definition later.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 85949fd6ae7f..9761512674a0 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2099,11 +2099,11 @@ static __be32 *encode_change(__be32 *p, struct kstat *stat, struct inode *inode, */ static __be32 *encode_time_delta(__be32 *p, struct inode *inode) { - struct timespec ts; + struct timespec64 ts; u32 ns; ns = max_t(u32, NSEC_PER_SEC/HZ, inode->i_sb->s_time_gran); - ts = ns_to_timespec(ns); + ts = ns_to_timespec64(ns); p = xdr_encode_hyper(p, ts.tv_sec); *p++ = cpu_to_be32(ts.tv_nsec); |