From patchwork Wed Jun 20 07:50:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 139292 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp500016lji; Wed, 20 Jun 2018 01:32:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKdpWUhXn0DzW01GvJ5Bz33ct7gx3Kn2goGoWPkwYG4nPIC2Ez/woSDsXgkDlinNQ8vxX1t X-Received: by 2002:a62:ea14:: with SMTP id t20-v6mr21870919pfh.117.1529483576552; Wed, 20 Jun 2018 01:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529483576; cv=none; d=google.com; s=arc-20160816; b=jdvAm3Dgwis20NhJrHFNByVU5B8e9ZruTSXsQypYxyYwoB5ZPn9KmOLuNfcJQGoscv //qCmSgnmtfqd3TdnlBn3GVPFmIyypf1uG3BPmmzfpGfeBPi+DEdMb/Ass0/DNyhvzwo oPlmdicoswExK5OdNAqWnGEIFSMxJiwp4m1TgeaTQyOUlSnm5VFRMLfUfHlbL/+Uuwbt 9jZaGoKbxTyRPzUI5j768br9xo42/xsKWDSA2AL9W8qAGQQ4Arp9sSuD9A8qEfsT/LCT XTjIRAemxan1zc3F56G7kPYzoVIDBdpmm74Ygm6rUwuHA50gSPRFQeuzNeW+zotzVTML g9eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TgUEnpjPJ95RxE0Yj8NXft43uinScOQlBsyeH64EPIk=; b=Py2PCSYcQVxLbO5EbFr1/fsBSMh/86aFqCC8RwSvIB/75TTCwBYRgJyDtD41TPuVzg +QpMaQnagJMl5RCiawOulkL5lRg0G4z47rf5D6PVYbZPPvqN4JknMs6UCXTpo6GkydKe j+YUbjtpx2Hz9oRQuCwVQ6H7jzIGf1KdEjSE/+pd8sE5OZpNAXYVBAswW4dLwXFT3ocq U6tDVi61/OGCoBspsJ2qpsZ42ZJyWXB1BRkibtwsBmkPU+OOFithbflAJkS2pYEOykut epjGQ0LQgQwBnAC/oWvNlFUtagH8MiYej4EakBziz1sfMGHdp9cGjYsowJFkefRNB4yl G+MQ== 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 l65-v6si1577731pge.46.2018.06.20.01.32.56; Wed, 20 Jun 2018 01:32:56 -0700 (PDT) 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 S932602AbeFTIcy (ORCPT + 30 others); Wed, 20 Jun 2018 04:32:54 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:40021 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbeFTIcv (ORCPT ); Wed, 20 Jun 2018 04:32:51 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MYvrP-1fiaQx0I4p-00VjOU; Wed, 20 Jun 2018 09:50:44 +0200 From: Arnd Bergmann To: Ryusuke Konishi Cc: y2038@lists.linaro.org, Arnd Bergmann , Andrew Morton , David Howells , Jeff Layton , linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] nilfs2: use 64-bit superblock timstamps Date: Wed, 20 Jun 2018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ZQHmB3DOql9NZoBA2rqmSud57YA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mount time field in the superblock uses a 64-bit timestamp, but calling get_seconds() may truncate the current time to 32 bits. This changes it to ktime_get_real_seconds() to avoid the potential overflow. Signed-off-by: Arnd Bergmann --- fs/nilfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 Acked-by: Ryusuke Konishi diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 6ffeca84d7c3..1b9067cf4511 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -834,7 +834,7 @@ static int nilfs_setup_super(struct super_block *sb, int is_mount) sbp[0]->s_max_mnt_count = cpu_to_le16(NILFS_DFL_MAX_MNT_COUNT); sbp[0]->s_mnt_count = cpu_to_le16(mnt_count + 1); - sbp[0]->s_mtime = cpu_to_le64(get_seconds()); + sbp[0]->s_mtime = cpu_to_le64(ktime_get_real_seconds()); skip_mount_setup: sbp[0]->s_state =