From patchwork Fri Dec 13 14:10:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 181571 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp691611ile; Fri, 13 Dec 2019 06:11:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwoxaLB/vksdk6tubVHsEelYeRU8aGSoUVeIeeyZhI6zpOioVfozEnZY2v7ylWFA7lmsRC7 X-Received: by 2002:a9d:578a:: with SMTP id q10mr14329538oth.215.1576246309743; Fri, 13 Dec 2019 06:11:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576246309; cv=none; d=google.com; s=arc-20160816; b=TrKRnhabjkfILZAGTYomocpcPRJhILAim5ooqSmWbQgv3+YdkhMReDVbUa9OxJN3Yr n4KM0R4itim4oNX/tEUUj5QW41SfL9d8Z/HjroWgqfkMybleH378ohbcSpfWl+ij+kaY aBth8/Uim4TafURUD4JKQZxUrg4CGof9A6WS/JXuLPYG5TJHByfBw45GsSgKOkB1AeaA a2Hg1R1ETZKl32MiCIDRHVtmFjqTW8OV7mPti772iQYvU5vUHyEhgd1f8+qIISAfH1Xa sulqsHFZF7oAMB0tPyk3B7gyK7DHVSqCTERhxd81ipx1qXpvcRgxzWd+1ln2JDYezA0v 0n8A== 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=wXb1iUCc54S5BJfWgNavW1TKOmf0jp4QewjiU6wEiF8=; b=wSjLLREglOPE9DCfrcJSAe8TzRe+a18EuWUtzZIuElSVVKWfkHfVavI8IruDiySf/P hNqsyx2BbbljbQLzS/5A9MzEFp8e1PTBfrU+ThaAAM5w3XPUpRlYqkRiTpBReNnyPJQ4 MuHh14aaZZGvP7iuxweKASjFa7hgv29S6T+5kd2VZYsq8SJQn5CXkZeYpoERAPZSSizr 4qyl9KOExlstMmQwSQovmrnJnCAEV0uGxB1i6EuuiCu3ug7gjkqDzhG14f6RtsmVS+md XkDKisEeZowM/xCXHpGs6gorqd+pRMde/5nlk5+clphE55kjfOd245t5OzFWIyhewcrh oL3w== 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si5135005otp.198.2019.12.13.06.11.49; Fri, 13 Dec 2019 06:11:49 -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 S1727834AbfLMOLs (ORCPT + 27 others); Fri, 13 Dec 2019 09:11:48 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:53621 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727563AbfLMOLC (ORCPT ); Fri, 13 Dec 2019 09:11:02 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MDyoW-1iY6g00PeG-00A05y; Fri, 13 Dec 2019 15:10:56 +0100 From: Arnd Bergmann To: "J. Bruce Fields" , Chuck Lever Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, y2038@lists.linaro.org, Arnd Bergmann Subject: [PATCH v2 04/12] nfsd: use timespec64 in encode_time_delta Date: Fri, 13 Dec 2019 15:10:38 +0100 Message-Id: <20191213141046.1770441-5-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 X-Provags-ID: V03:K1:tZvyC8/MQsSdMybbn7ZBclcwu9BJ9OSnv+w2Y49XsSD5Al3PHeV 1BpQWJ8CTGqYOrtPofdSkjDSiAe1FTqlMslMMcslfrQVwZo0TJcZsjeoV0vOa4OfOMwU94z cpb4m99r8/SDq4g1TmCXRfhgN390wAf1G4f9P8sD559qT2taHWbpzKYkBd/SYTQnMD1KmaK OUpuH4MSQDemrLltAdLrA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:AdmRwze8Z4E=:xF4d1Q1zbssKpYCKrZAehX iOa2n27bjHhFhK+1X3q2tJsP23OQKx+mtiNF0JzO63D5wzhzioYCobJkMXY75MXI1p4YpauX/ 91nixKEqpV3FK7U9yX9/Ve4UVdTp/3UKEyVb0J1l4ctNmsQ+MtIlS8p0WCGPxfkcQKdATaqqQ b5rzmP2ZuOozb52J2ySXyLl9GjHDAUWiTUwvJOqkK8eSMZXnNJ/seuwJXVMejhHasDdSiIUse wWkn9pIyAUQsOE5WxOE8SU5Q3SA5XCM2O+7hWIJUHWvsCvylPAZCNeFpq1IsENaXZB4kjx5su NuKATCHd4a9EtwWD74lkt4PPPsUgfI1tOaT8N7dwQH6Qo2IPi63dJQHQLmT5luY4En7SmwP41 W/vuVXK7zg3VWzGXk5e3OPpw1W0A1+bhygoX6f2+OgUMcd9L6qILvXmYsxjyO2aOC6Txg1J0r KmEz2asupLeds71AnKt0VuxFlj4JEN7EtFwdPj8qzD+NOEzWb2V0NijcKf0TJk3dELj3HgGtF nqefQE1umqOWr9WyPFNtgaugDhj4Xe0TYvrMb4CejcV86cXc6B9I5dDNJQVb4wIIcYmBRBNJD z6M88crsThjQ/VzH5avisyxpG+HzRYYDIe3sb9YMIX0/dxGnB70sDA9FBlMeNtZ/VCd3sNJJh aKHIT4xmXNN8idc4pUoUrYk3PWcVByde3cR0i6K5lRpZzlFAA7V0RnSS/3PNRS/+oGiPMG1w1 A3L2HPVvXNwsUOMUmASY9x8O+O03OZGvDb3TmVOcjjeIOt7td2Zaolo9hn0PDkEknveBBW9zW AmRorA3LJfohba9VLRYd4NtsIFb6+yQecHEynYIXb1jKfa1CRBot2ykyVdzlrGHhjwJPJXeIy vH3EdYL4Sl644kr5PE+A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The values in encode_time_delta are always small and don't overflow the range of 'struct timespec', so changing it has no effect. Change it to timespec64 as a prerequisite for removing the timespec definition later. Signed-off-by: Arnd Bergmann --- fs/nfsd/nfs4xdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index d2dc4c0e22e8..d95e9668eeff 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2024,11 +2024,11 @@ static __be32 *encode_change(__be32 *p, struct kstat *stat, struct inode *inode, */ static __be32 *encode_time_delta(__be32 *p, struct inode *inode) { - struct timespec ts; + struct timespec64 ts; u32 ns; ns = max_t(u32, NSEC_PER_SEC/HZ, inode->i_sb->s_time_gran); - ts = ns_to_timespec(ns); + ts = ns_to_timespec64(ns); p = xdr_encode_hyper(p, ts.tv_sec); *p++ = cpu_to_be32(ts.tv_nsec);