Message ID | 20191213141046.1770441-8-arnd@arndb.de |
---|---|
State | Accepted |
Commit | b6356d420296e4fd5045ab3b404bfeb9f659ce08 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp691068ile; Fri, 13 Dec 2019 06:11:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzz+qI89LFaQPLfRFm6saLwhCUA9x7uxmpZ3+t/FedUOEON0QvCKIwalj5NX504ugqNIG4C X-Received: by 2002:a05:6830:2087:: with SMTP id y7mr14090094otq.96.1576246284676; Fri, 13 Dec 2019 06:11:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576246284; cv=none; d=google.com; s=arc-20160816; b=qCWumUeFs3WN6/oM2ehB0R3LGiAwVTz14YbnFXMCMu4tv8AVj7zlqShh8dScYQhZax 0g7c+GjRUp29VpKKDwqQc7EXlJE6l4TKiEsYpC9O/k3lrUJ46CRskjfjQKCIT6Y5s9bG ErtSkUAEFmA3z7yZcAztGJqqxT+N5HCIBPupOkb0wAOwzSUtgxHDyWjkkxVWI/IE1hP7 IEoZYnShPla8pJD9APIahpwfMpqJWYq9KWZmyyvgilGXmSp8MRkl4s86nChV8Uga41H6 LtFS9JA4eVk+zNvjXT80miJhO5Nn61wQoVSKTIDlGpCjZeALp23f1C8iR0VeFtUdm1py NL2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MAnuPeH8MQ7Zv2N6hh8mt/CD+gsk+ZTHINwLn0K3ukg=; b=IHoa7tlzEajimpelX7a/SxIQtCTq0CaCMZwPJdm79V0R/s6sg1dsneU1cX+4QHsfW7 mYF2kY1cLVJeKCY21uM+ClYkTU3gub6nyFkT9s8e9gKpm6VZ0w2kuqIQxW9Z8F9HnWf2 qs4M/1SVb+5EfgMlVsCXV8Gw03cyIE0PziseVzN5ETJ8iFYyPBBI+Bm6eNgTSm1Zcw06 4SEr9dlRX19eJe3grTeGDE9oM/lv4yjS3ue6JhqiZimE5/Kv/rdU894lp7numIWrsdxD lBu+8GAjgIXawF52NNxU/MVnaddudVrIwKPglMSKZ2UoFHw9YejLZ7n0newF1JqMaHdg 8OSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si5250259oti.152.2019.12.13.06.11.24; Fri, 13 Dec 2019 06:11:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727777AbfLMOLV (ORCPT <rfc822;christophe.lyon@linaro.org> + 27 others); Fri, 13 Dec 2019 09:11:21 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:47387 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727608AbfLMOLD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 13 Dec 2019 09:11:03 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MqatE-1htFXk3NMO-00mcAo; Fri, 13 Dec 2019 15:10:56 +0100 From: Arnd Bergmann <arnd@arndb.de> To: "J. Bruce Fields" <bfields@fieldses.org>, Chuck Lever <chuck.lever@oracle.com> Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, y2038@lists.linaro.org, Arnd Bergmann <arnd@arndb.de> Subject: [PATCH v2 07/12] nfsd: use time64_t in nfsd_proc_setattr() check Date: Fri, 13 Dec 2019 15:10:41 +0100 Message-Id: <20191213141046.1770441-8-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191213141046.1770441-1-arnd@arndb.de> References: <20191213141046.1770441-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:sX4dzulNvI3GFKBUZrcox6lRFdAV/6K1BJ9TvA9ivOBNVK9j/Fq HRkqj1+KlXNIMOzBQU1Xwc0Zt8X512GFwS7+50tQv4ye+TTIUFaV+tPsdzIAz6k9IoK5zQv wLf5aSCwQeZZzhx0SN2yos9NOwz3b2R466i8u7lDzFbCYfMYmEXJmjelP1g3OleNKYHT+hX 7UqX81fHsFigibDLRpRHQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:4hTU0Zhy3NQ=:bv7zUqTP1evs5iKvCSg0Lm PWh+T4mOdKNjNJstivcGtjiydc7IZ3gSqHcbbPsCuoTVP+xMTWkYehmIyu1DcBjRL+ecLJ0+X ZJD6hl3vEk7hFKMqESnHpTYmz3MumF2cGk7ddeNT2/utJtc4hBxS04XIUs/SV5xPYH2ZDvrAV V4Zk8YSoj+98aKd3X/MklOsAEb4JJFI726yWsSywMOsHuJXvoP/1cwHgYIxP5nbnQOSdqK1df MOOvxp02OsMTr4p7iiPxAQ5EOviTs30gNQO/csbivnWmSH4xhXWREApWXjdAN//PvilsYetGe OE1Yi1pwNhLl2uNkSCsuPrsvXIr26+yNj7ZFvS9hJ5TpiVqZdk6ckdGbYRUlW3p/zPxgk8m3N NbPovt9gt9IOGOgIKjIESqCbrHCMyqQ0yJl973vWPUzMkIV6mchAOSb5HYXU/RfRjtTP2JOAk 2D2zNcQuJYp9YKWJg3YOcwqcdXKbCRZb0YIM4Zq53XJiL5YJOCojmcW3nA3ZHiOgCkfX4QhVz BL7U0W/rjW6fdpVJDl3gVbiqiCDqV7SqOjYA9Yi15VTgUFwp9Mrd+ZtANRvyRlyiw+FPNqiWj +06/ZeRJE4dBtPz6MXkLEmoFBtCvvqqskQJXNqxuB3mHi8MXtVaiZoCwVYDvzaoN1j7xdJT8n qqheUol17GKV+sNz5q9/7lHGfQm3PAVf4WXIx1RcnTAUzQ9jc2MslG+dNEuRc7I0PZmp9h9Pu Q/0gMb+f+gZnJi+lrT+OXQKtOIYJV+5cvTPpmgrXSJvgWQ6TCSwgt8R9IColqV1Nz4otLJ3wv LERsNwtkT11JsIdZEaP6cb3hVo17GSdMJzzc89I2xRPmFDhBATDB/jplloCjXF3+bnBbhGk0I RypZQYndZrym8+J9LvqA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
nfsd: avoid 32-bit time_t
|
expand
|
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)
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 <arnd@arndb.de> --- fs/nfsd/nfsproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0