From patchwork Thu Jun 9 05:04:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 9166219 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B9B9C60467 for ; Thu, 9 Jun 2016 05:07:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB20C26490 for ; Thu, 9 Jun 2016 05:07:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FE67282F9; Thu, 9 Jun 2016 05:07:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33C1426490 for ; Thu, 9 Jun 2016 05:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426587AbcFIFGS (ORCPT ); Thu, 9 Jun 2016 01:06:18 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35082 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426343AbcFIFF5 (ORCPT ); Thu, 9 Jun 2016 01:05:57 -0400 Received: by mail-pa0-f66.google.com with SMTP id gp3so1909939pac.2; Wed, 08 Jun 2016 22:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5/oxDF9yRBbM7HPwOuDQT+dwW6u914jsuC35cqWpWBE=; b=VyByURx3e0nVa+wkoQHRk11M0uziHppE/NHVdxFMVd4gvXbnzzgeAMfuQOefusnwgP b3nH8CogQ6T3BTgYp2OpQgoaWLT/tpUkWrPfCy7T4OwH9hg7QHi+WIXWbh2/cPpBI+t2 1TXkQSlOuhWwFgEI1l4gZEmcyYNcXg6hdDyzkQqKFeQ3rV/kzTW/CavEMtO9oLsSImhF jRoz8tk8towGNPkAJpD0d0KJk2gN1O8BKLVhTd/cO7P/pDLX/9EB3ZONv6e7TvbXL5Y4 c8PDEOtyW/sEa2kgu66MiFtV48cdGSqaisMMgVP4WbCmW88q+rhQJUtS7P/50Rc0biDV nPmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5/oxDF9yRBbM7HPwOuDQT+dwW6u914jsuC35cqWpWBE=; b=fHiBujcRHs0N7YJHHxlWMzU2iwVXNC1tilZZYhzflDww6d9xj4j56mduz00K9Rxs5z ph1cUT01XdTEr2KH5O0Au2MrwXP5Yh6tDR1kLgDkh8q5hV74qK4ApI9EFw7bpDFjLmAs J3RWhrYN58S4/nV3GXctbHOxCNifmGO4o3ZqI2cC/JPoUwtJ6qLseZmhZa9Q7Ew0HUsp NHWLtBKEB2lbAiuKW/neUH9NwK1jO3mYDOVOGmBzIqY9ZeFTEd/eDhe2d7Z+2uRyENHg DonV1rRwZy3/6T43kAdjohzfKW/dqDaBWB1jCIGLRvSTIHHJQg2CvEAnUzxocG4BNNlT V0zA== X-Gm-Message-State: ALyK8tLemKqUb1vcq1ldQy6aeymu8cD6Utvx5bkHzLYcwe94vbzX3AMCaXYtYaeSESw99w== X-Received: by 10.66.231.35 with SMTP id td3mr10106975pac.56.1465448756771; Wed, 08 Jun 2016 22:05:56 -0700 (PDT) Received: from deepa-ubuntu.hsd1.ca.comcast.net (c-73-252-251-201.hsd1.ca.comcast.net. [73.252.251.201]) by smtp.gmail.com with ESMTPSA id 129sm6220808pfe.3.2016.06.08.22.05.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 22:05:55 -0700 (PDT) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Al Viro , Linus Torvalds , y2038@lists.linaro.org, Mark Fasheh , Joel Becker , ocfs2-devel@oss.oracle.com Subject: [PATCH 14/21] fs: ocfs2: Replace CURRENT_TIME with ktime_get_real_seconds() Date: Wed, 8 Jun 2016 22:04:58 -0700 Message-Id: <1465448705-25055-15-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CURRENT_TIME is not y2038 safe. Use y2038 safe ktime_get_real_seconds() here for timestamps. struct heartbeat_block's hb_seq is already 64 bits wide and accommodates times beyond y2038. Signed-off-by: Deepa Dinamani Cc: Mark Fasheh Cc: Joel Becker Cc: ocfs2-devel@oss.oracle.com --- fs/ocfs2/cluster/heartbeat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 6aaf3e3..d13c646 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -737,7 +737,7 @@ static inline void o2hb_prepare_block(struct o2hb_region *reg, hb_block = (struct o2hb_disk_heartbeat_block *)slot->ds_raw_block; memset(hb_block, 0, reg->hr_block_bytes); /* TODO: time stuff */ - cputime = CURRENT_TIME.tv_sec; + cputime = ktime_get_real_seconds(); if (!cputime) cputime = 1;