Commit b6356d42 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by J. Bruce Fields

nfsd: use time64_t in nfsd_proc_setattr() check

Change to time64_t and ktime_get_real_seconds() to make the
logic work correctly on 32-bit architectures beyond 2038.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 2a1aa489
...@@ -94,7 +94,7 @@ nfsd_proc_setattr(struct svc_rqst *rqstp) ...@@ -94,7 +94,7 @@ nfsd_proc_setattr(struct svc_rqst *rqstp)
* Solaris, at least, doesn't seem to care what the time * Solaris, at least, doesn't seem to care what the time
* request is. We require it be within 30 minutes of now. * request is. We require it be within 30 minutes of now.
*/ */
time_t delta = iap->ia_atime.tv_sec - get_seconds(); time64_t delta = iap->ia_atime.tv_sec - ktime_get_real_seconds();
nfserr = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP); nfserr = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP);
if (nfserr) if (nfserr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment