diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-11-03 19:50:18 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2019-12-20 01:46:08 +0300 |
commit | 2a1aa48929af78bfe8c4d4fe4b1ed8996af47cee (patch) | |
tree | 606f1abcf8edee423f166800ecf43f8319cbe1a7 /fs/nfsd/nfs4state.c | |
parent | 9cc7680149b238223bbb8bcf3272f6bd47f1fbfb (diff) | |
download | linux-2a1aa48929af78bfe8c4d4fe4b1ed8996af47cee.tar.xz |
nfsd: pass a 64-bit guardtime to nfsd_setattr()
Guardtime handling in nfs3 differs between 32-bit and 64-bit
architectures, and uses the deprecated time_t type.
Change it to using time64_t, which behaves the same way on
64-bit and 32-bit architectures, treating the number as an
unsigned 32-bit entity with a range of year 1970 to 2106
consistently, and avoiding the y2038 overflow.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a178374bacd5..36bbb18abf77 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4721,7 +4721,7 @@ nfsd4_truncate(struct svc_rqst *rqstp, struct svc_fh *fh, return 0; if (!(open->op_share_access & NFS4_SHARE_ACCESS_WRITE)) return nfserr_inval; - return nfsd_setattr(rqstp, fh, &iattr, 0, (time_t)0); + return nfsd_setattr(rqstp, fh, &iattr, 0, (time64_t)0); } static __be32 nfs4_get_vfs_file(struct svc_rqst *rqstp, struct nfs4_file *fp, |