From patchwork Mon Nov 11 20:16:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11237647 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A25313BD for ; Mon, 11 Nov 2019 20:22:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7261D222C1 for ; Mon, 11 Nov 2019 20:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727732AbfKKUWQ (ORCPT ); Mon, 11 Nov 2019 15:22:16 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:42475 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727693AbfKKUWC (ORCPT ); Mon, 11 Nov 2019 15:22:02 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1N8XLj-1hqEL53gMD-014Vte; Mon, 11 Nov 2019 21:16:51 +0100 From: Arnd Bergmann To: linux-nfs@vger.kernel.org, "J. Bruce Fields" , Chuck Lever , Trond Myklebust , Anna Schumaker Cc: y2038@lists.linaro.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 14/19] nfsd: use time64_t in nfsd_proc_setattr() check Date: Mon, 11 Nov 2019 21:16:34 +0100 Message-Id: <20191111201639.2240623-15-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191111201639.2240623-1-arnd@arndb.de> References: <20191111201639.2240623-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:bZJ6dABjb/h5bnFGHvp5XdGnpOQ48DZK/y9xvfcHGKpTQoH3/bT 1UeC7E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Cs5rI5G9hnugAQivEv6Uam6wIY9LKR Z/Zx6iJNL0/SMqiwPm3A== Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 --- fs/nfsd/nfsproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index aa013b736073..b25c90be29fb 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)