From patchwork Mon Feb 22 15:17:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8378811 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5388AC0553 for ; Mon, 22 Feb 2016 15:22:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 621B52037C for ; Mon, 22 Feb 2016 15:22:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 778A920340 for ; Mon, 22 Feb 2016 15:22:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752856AbcBVPWh (ORCPT ); Mon, 22 Feb 2016 10:22:37 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:36581 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474AbcBVPWg (ORCPT ); Mon, 22 Feb 2016 10:22:36 -0500 Received: by mail-pf0-f176.google.com with SMTP id e127so94442138pfe.3; Mon, 22 Feb 2016 07:22:35 -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=Fr4A0ZeEHBEHJwkDFswC5n1TfuFZd1kgo5rAdgyVF24=; b=dz68iFkzfuyhvxVbhRLRl8Gksoj1dQokQYOl+qeYjAvnBAZpUz+ldb95+xcPJZV10h cNw6pkhxClJnKCDHQYz3ztB38HstWzi5Brf6hjaAJ7f9mjAAHFzVc3RvA7IRdf1Q7S+K 5D/RwwA9Cqmh0rwcTk+XxfcDrm7nnIsj+F27R7ID08XkerPq/EhKDSJ8RS7ZUhI/gaeD NSIWc78CrYxl2ocKdUhssIxQ5FH9o0pOCImBObyrDqPPw2TfpYi76CtKU6Nz+9Kj6vPW VbcIUimhD+0/838xbm9ZldvLsd+MWnSAtEaH1QAZxOEvYpMg6/RFXF5ZmR2pAJswe/sD xhFA== 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=Fr4A0ZeEHBEHJwkDFswC5n1TfuFZd1kgo5rAdgyVF24=; b=jgygOae0GewfXI+RFq0DxKj2WVNCXtN47VVO+cnQClLF40MHUWSAFZEbsyi5ssTyY/ y/9VVJC22+/zR7b+9Emmh3Ra2jCxiJOHIXALCENKVKu2PTtErkUIZFVLI/Sn9bXLuJVb 2i/6/5sxwDJsbnMVfJm3ywEmBZH20YI+QAq3cgvL7u29t0hl8AGjYqt3mclkZ/g49Y7D JjyjBo0LHdmGgmPPxSYcbBybNLpqX1L1TJX+u/6RoxzHM07RnvD73T3VwC8I7/xii1yB ec5qCyQb2+gmdr/kiKSicL/j0s60kGnFXmuJplS5cuNk5U5FzSb2f34dd2wluFNWoM3F X6Eg== X-Gm-Message-State: AG10YOQEydQYZsRFWEGllawPnVTtST/WHmtllUO1NGcM3l3mK4oxZ5v6o83pLXYQq/Se0A== X-Received: by 10.98.43.149 with SMTP id r143mr38439862pfr.7.1456154555534; Mon, 22 Feb 2016 07:22:35 -0800 (PST) Received: from localhost.localdomain ([106.51.225.115]) by smtp.gmail.com with ESMTPSA id z3sm37888603par.17.2016.02.22.07.22.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Feb 2016 07:22:35 -0800 (PST) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Joel Becker , stoph Hellwig Subject: [PATCH 4/8] fs: configfs: Replace CURRENT_TIME by current_fs_time() Date: Mon, 22 Feb 2016 07:17:50 -0800 Message-Id: <1456154274-30487-5-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456154274-30487-1-git-send-email-deepa.kernel@gmail.com> References: <1456154274-30487-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=-6.8 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 CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_fs_time() instead. Signed-off-by: Deepa Dinamani Cc: Joel Becker Cc: stoph Hellwig Acked-by: Joel Becker --- fs/configfs/inode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index cee087d..5f24ad3 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -75,7 +75,8 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr) sd_iattr->ia_mode = sd->s_mode; sd_iattr->ia_uid = GLOBAL_ROOT_UID; sd_iattr->ia_gid = GLOBAL_ROOT_GID; - sd_iattr->ia_atime = sd_iattr->ia_mtime = sd_iattr->ia_ctime = CURRENT_TIME; + sd_iattr->ia_atime = sd_iattr->ia_mtime = + sd_iattr->ia_ctime = current_fs_time(inode->i_sb); sd->s_iattr = sd_iattr; } /* attributes were changed atleast once in past */ @@ -111,7 +112,8 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr) static inline void set_default_inode_attr(struct inode * inode, umode_t mode) { inode->i_mode = mode; - inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; + inode->i_atime = inode->i_mtime = + inode->i_ctime = current_fs_time(inode->i_sb); } static inline void set_inode_attr(struct inode * inode, struct iattr * iattr) @@ -195,7 +197,7 @@ int configfs_create(struct dentry * dentry, umode_t mode, void (*init)(struct in return -ENOMEM; p_inode = d_inode(dentry->d_parent); - p_inode->i_mtime = p_inode->i_ctime = CURRENT_TIME; + p_inode->i_mtime = p_inode->i_ctime = current_fs_time(p_inode->i_sb); configfs_set_inode_lock_class(sd, inode); init(inode);