From: Arnd Bergmann Date: Sun, 3 Nov 2019 17:06:52 +0000 (+0100) Subject: nfsd: use time64_t in nfsd_proc_setattr() check X-Git-Tag: baikal/aarch64/sdk6.1~10003^2~30 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=d5baca7afb893d3c1bbd1c6e554212d746e40149;p=kernel.git 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: Arnd Bergmann Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index aa013b736073c..b25c90be29fbd 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -94,7 +94,7 @@ nfsd_proc_setattr(struct svc_rqst *rqstp) * Solaris, at least, doesn't seem to care what the time * 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); if (nfserr)