From patchwork Mon Feb 22 15:17:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8379011 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 D049EC0553 for ; Mon, 22 Feb 2016 15:28:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DFF7C204FF for ; Mon, 22 Feb 2016 15:28:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DA2FC204E3 for ; Mon, 22 Feb 2016 15:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbcBVPXH (ORCPT ); Mon, 22 Feb 2016 10:23:07 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35372 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752785AbcBVPXE (ORCPT ); Mon, 22 Feb 2016 10:23:04 -0500 Received: by mail-pf0-f176.google.com with SMTP id c10so97375516pfc.2; Mon, 22 Feb 2016 07:23:04 -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=VwL5GniAQRzAHXBmXJWF+wiahDSt/zKr47hdaAL2iJw=; b=Vwl96dHCUsY9XwVRhVrKux2pOskCVSIe1AwmjmCbB0W8AHVuIINHcoJNliMuP9Z0lP okXOcD/TL2YSH9Ldh2oBpS11vdPRWGytHaTtT94sA/wJwu/w681mBLDLkG9+mDdrGo3T VTGZ+cIln40wtJy0Hv/u5R1zvIfu8i4eVT+c8jcVd7eNBf8gUZC4ODch4NepFTkkb5Nx xj9GQDOkV+3XaXH5zzE8nFEvOXQnMPNfKS7qP/9E0XjsYmNLqWB5ScrYPs978rna2YFO CED6DhKNvwvafQoeC6r5lF4+TXjucrRSAs8cItKN7rY9sEQTAnR5beKnfZhBB0Wzy7zf N1+A== 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=VwL5GniAQRzAHXBmXJWF+wiahDSt/zKr47hdaAL2iJw=; b=aC847+/wM4aa1WDeNZLMbxAuyYTfc/NmyxX4B4Wzx5GnFSgqBEOsa1hZkFX7bgbSNM czWhS7JyNCGQjMYwXg0Gua1CIGfX1vCCaDPd+9EpZMyb0M6iR24u7xP6ypcANJS1WlUQ 6O0plYNgj0QXu7GzkFZvmyUAdiez1v5/wfKg0xbb6rREVTOkV3mmJDSAv8sqPGdajUTj kI+HxcfzAZgWlfhy1zqkZ0PnG+qqgEgFhRj6yENp6UdInSpNIvksu1sLrKdDyB3Lhtg5 56/+XVfdjxM0ezM/bfDLocpg8/Mqy2ocSATiO+ksPR3GDczWE52hN77Jen+jwt+d7n7R /F/Q== X-Gm-Message-State: AG10YOQloIQLxjfIVHCP0RNO8MYDzj7vNfZj31xKtjH1jL/3kT8pEKcikrDfX5kAprw2mg== X-Received: by 10.98.66.157 with SMTP id h29mr38980571pfd.91.1456154584571; Mon, 22 Feb 2016 07:23:04 -0800 (PST) Received: from localhost.localdomain ([106.51.225.115]) by smtp.gmail.com with ESMTPSA id z3sm37888603par.17.2016.02.22.07.22.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Feb 2016 07:23:04 -0800 (PST) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Al Viro , Michal Hocko , Konstantin Khlebnikov , Naoya Horiguchi Subject: [PATCH 5/8] fs: proc: Replace CURRENT_TIME by current_fs_time() Date: Mon, 22 Feb 2016 07:17:51 -0800 Message-Id: <1456154274-30487-6-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=unavailable 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: Al Viro Cc: Michal Hocko Cc: Konstantin Khlebnikov Cc: Naoya Horiguchi --- fs/proc/base.c | 3 ++- fs/proc/inode.c | 6 ++++-- fs/proc/proc_sysctl.c | 3 ++- fs/proc/self.c | 3 ++- fs/proc/thread_self.c | 3 ++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 4f764c2..bb18566 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1664,7 +1664,8 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t /* Common stuff */ ei = PROC_I(inode); inode->i_ino = get_next_ino(); - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = + inode->i_ctime = current_fs_time(sb); inode->i_op = &proc_def_inode_operations; /* diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 42305dd..8b902c4 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -68,7 +68,8 @@ static struct inode *proc_alloc_inode(struct super_block *sb) ei->sysctl_entry = NULL; ei->ns_ops = NULL; inode = &ei->vfs_inode; - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = + inode->i_ctime = current_fs_time(sb); return inode; } @@ -421,7 +422,8 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de) if (inode) { inode->i_ino = de->low_ino; - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = + inode->i_ctime = current_fs_time(sb); PROC_I(inode)->pde = de; if (is_empty_pde(de)) { diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index fe5b6e6..7153daf 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -444,7 +444,8 @@ static struct inode *proc_sys_make_inode(struct super_block *sb, ei->sysctl = head; ei->sysctl_entry = table; - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = + inode->i_ctime = current_fs_time(sb); inode->i_mode = table->mode; if (!S_ISDIR(table->mode)) { inode->i_mode |= S_IFREG; diff --git a/fs/proc/self.c b/fs/proc/self.c index b6a8d35..952ce1c 100644 --- a/fs/proc/self.c +++ b/fs/proc/self.c @@ -56,7 +56,8 @@ int proc_setup_self(struct super_block *s) struct inode *inode = new_inode_pseudo(s); if (inode) { inode->i_ino = self_inum; - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = + inode->i_ctime = current_fs_time(s); inode->i_mode = S_IFLNK | S_IRWXUGO; inode->i_uid = GLOBAL_ROOT_UID; inode->i_gid = GLOBAL_ROOT_GID; diff --git a/fs/proc/thread_self.c b/fs/proc/thread_self.c index e58a31e..ef08485 100644 --- a/fs/proc/thread_self.c +++ b/fs/proc/thread_self.c @@ -58,7 +58,8 @@ int proc_setup_thread_self(struct super_block *s) struct inode *inode = new_inode_pseudo(s); if (inode) { inode->i_ino = thread_self_inum; - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = + inode->i_ctime = current_fs_time(s); inode->i_mode = S_IFLNK | S_IRWXUGO; inode->i_uid = GLOBAL_ROOT_UID; inode->i_gid = GLOBAL_ROOT_GID;