From patchwork Wed Feb 3 06:07:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8198531 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9F6699F4DD for ; Wed, 3 Feb 2016 06:13:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D32F9201BB for ; Wed, 3 Feb 2016 06:13:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F6A720172 for ; Wed, 3 Feb 2016 06:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932982AbcBCGL6 (ORCPT ); Wed, 3 Feb 2016 01:11:58 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36352 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559AbcBCGL4 (ORCPT ); Wed, 3 Feb 2016 01:11:56 -0500 Received: by mail-pf0-f194.google.com with SMTP id n128so535835pfn.3; Tue, 02 Feb 2016 22:11:56 -0800 (PST) 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=2zFc6yVBOW34T/DsRCBTy0m6sqBsZCfs6Kki/OauQ3g=; b=OGlOcXqfnlb1GhQqPnmyif8kRoc6TO259YAAOuYiEkoDgNxIc6LbsKNF3pfPFPurG6 5/00KIYUTsFy9bxnvO9cxkylwAatOSr+QJEodQsXLtGinyJeNv1nj1TC6bShveEl+R+W N6MX6tarnKkewaws0mY3cRH9jDdB8cF4sJFXj56YuOm1UaUI6NILrsCkl3/Cco9HGIZ4 L09KoawvdnD6Lu1Hh41lTXFol5TOYAUm3n9WVQnF6mTkWrZab2SKQS72Ykkw8/OpKPdG ZRFLHqZSOJ90w11l2s8xM+rkCvfGXNzukiOkkP06DckY1+JNUe2xzmxChWaGGChVFEy5 vIvw== 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=2zFc6yVBOW34T/DsRCBTy0m6sqBsZCfs6Kki/OauQ3g=; b=mMjVZEiVHAiXojlzZTgWNP9tHz/3gzPlfNpkjAtR+4DmYrmuwkFwH9v7v/tJgP5FQi aqVtpzMnJNqqtRgRM7EE5P5eaQMkmoEcKwfaF30jQv6waz0+fQ2MDRFzSbSZisWNCAL6 t0zbtLjPYO4FeF0nRndUgjpuVGddFfh/4z1DzE2sO2RxoX2Bif/EN1iYiIqUQETjJfUX tBBmXRCbFGM9nMkVaA9bTOBc4eEoohD0rbqXM/YA1mlMF/GLrvTA1owh7QGoSTAYxWnN 9s4THGsGYYC0Jf+Ekq0/Zv0HQv+cr0iOZkmOwzmSkZp9+Vv2YGxt9K3W3Bp8J8UTjOVu C87A== X-Gm-Message-State: AG10YOSIuGxYMGlN4Y6NU6bBJh/0ArUBGQNNB/wxQAsZ9mfeNUHbTUndNMWCEFR2U+w0xw== X-Received: by 10.98.75.22 with SMTP id y22mr53865014pfa.147.1454479915800; Tue, 02 Feb 2016 22:11:55 -0800 (PST) Received: from localhost.localdomain ([106.51.31.224]) by smtp.gmail.com with ESMTPSA id kw10sm6817612pab.0.2016.02.02.22.11.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Feb 2016 22:11:55 -0800 (PST) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: Arnd Bergmann , Dave Chinner , "Theodore Ts'o" , linux-kernel@vger.kernel.org, Andreas Dilger , linux-ext4@vger.kernel.org Subject: [PATCH 06/10] fs: ext4: Replace CURRENT_TIME_SEC with current_fs_time_sec() Date: Tue, 2 Feb 2016 22:07:46 -0800 Message-Id: <1454479670-8204-7-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454479670-8204-1-git-send-email-deepa.kernel@gmail.com> References: <1454479670-8204-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-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The macro CURRENT_TIME_SEC does not represent filesystem times correctly as it cannot perform range checks. current_fs_time_sec() will be extended to include this. CURRENT_TIME_SEC is also not y2038 safe. current_fs_time_sec() will be transitioned to use 64 bit time along with vfs in a separate series. Signed-off-by: Deepa Dinamani Cc: "Theodore Ts'o" Cc: Andreas Dilger Cc: linux-ext4@vger.kernel.org --- fs/ext4/ext4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 0662b28..8dd04f8 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1489,7 +1489,7 @@ static inline struct ext4_inode_info *EXT4_I(struct inode *inode) static inline struct timespec ext4_current_time(struct inode *inode) { return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ? - current_fs_time(inode->i_sb) : CURRENT_TIME_SEC; + current_fs_time(inode->i_sb) : current_fs_time_sec(inode->i_sb); } static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino)