From patchwork Mon Feb 22 15:17:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8378781 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 6AE2DC0553 for ; Mon, 22 Feb 2016 15:22:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8779520376 for ; Mon, 22 Feb 2016 15:22:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 003E120340 for ; Mon, 22 Feb 2016 15:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752781AbcBVPWM (ORCPT ); Mon, 22 Feb 2016 10:22:12 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36335 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752390AbcBVPWL (ORCPT ); Mon, 22 Feb 2016 10:22:11 -0500 Received: by mail-pa0-f47.google.com with SMTP id yy13so92610634pab.3; Mon, 22 Feb 2016 07:22:11 -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=nhsvZ+CAAL+fMmJEOLD/DmPRhO8yfOeqCU85xiiEQis=; b=t3Bl301ekaJttzqbfCcEjwSKVhdLqdzXMCg1ZJxWNvfwfhV4DnE5a9RCIsahMLDOgw SUmuorL6ECHpsECce0Sc7KwUtXm634FHTcDdRvPHJRAkqKbkV7/RVP8pk53LSmcUrHiQ x3ETOmPsMivtkcopkNgHi78Y/Ktn+CALdRkcej7vgPH+OghfoyGXdDz2IIX0s+VehJAE iGGQNqkNWWg+Ti4TOxeTia7eaHwKYjnslT/DRud4DlB0ms8zW+NR6NgkusaTJJmC7gBB F9RxVo0F32ypcNAYGD8TCkSMODNK1X0PbErpXmXZU8UtnDYMSVGlQPOJedcebH0iR34k 1jDQ== 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=nhsvZ+CAAL+fMmJEOLD/DmPRhO8yfOeqCU85xiiEQis=; b=lzIaoHSZvQ2qgmxP8zt0IsZXTOqpuvvE+q/l7mRs6dfa2JZouzJm+4IpWY1C36ZXeL cRHyoWMJ/damTiDnF9kmmrRxmeW4EmgoqarFGdZ29LaqyS2XxOAq8qW8Mbu9WsVfgoEj kW89E0OAKyN6YljCKsgDFTUfRnuL9G0TI5GoQ7tM7joOi0LNlzItfO71JLFcsqfvF2EN 4rrXyJ+VLnM0r9Zj4ugLRRNUcQSbv3pYxn7IWJnNAP0i1Li0LHchYSuoq5jYuICyQKK0 P10RHjW/5+35RUYxeSoHXBoOnbpG9ZBJ1QbU/oXX7Ns++bXqweWogG7o0m0W2h9VPdjl 3MMQ== X-Gm-Message-State: AG10YOQ8eb84lDoJtFv0Pn9trDFYo41+v8KXJO6I9yCt5lCkTDpYE45uBYlx6gtAhhaKRw== X-Received: by 10.66.62.134 with SMTP id y6mr38769889par.43.1456154531159; Mon, 22 Feb 2016 07:22:11 -0800 (PST) Received: from localhost.localdomain ([106.51.225.115]) by smtp.gmail.com with ESMTPSA id z3sm37888603par.17.2016.02.22.07.21.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Feb 2016 07:22:10 -0800 (PST) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Peter Hurley , Al Viro , Josh Triplett , Greg Kroah-Hartman , Andrew Morton Subject: [PATCH 3/8] fs: devpts: Replace CURRENT_TIME by current_fs_time() Date: Mon, 22 Feb 2016 07:17:49 -0800 Message-Id: <1456154274-30487-4-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: Peter Hurley Cc: Al Viro Cc: Josh Triplett Cc: Greg Kroah-Hartman Cc: Andrew Morton --- fs/devpts/inode.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 655f21f..4eb338d4 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -280,7 +280,8 @@ static int mknod_ptmx(struct super_block *sb) } inode->i_ino = 2; - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = + inode->i_ctime = current_fs_time(sb); mode = S_IFCHR|opts->ptmxmode; init_special_inode(inode, mode, MKDEV(TTYAUX_MAJOR, 2)); @@ -392,7 +393,8 @@ devpts_fill_super(struct super_block *s, void *data, int silent) if (!inode) goto fail; inode->i_ino = 1; - 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_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; inode->i_op = &simple_dir_inode_operations; inode->i_fop = &simple_dir_operations; @@ -629,7 +631,8 @@ struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index, inode->i_ino = index + 3; inode->i_uid = opts->setuid ? opts->uid : current_fsuid(); inode->i_gid = opts->setgid ? opts->gid : current_fsgid(); - inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; + inode->i_mtime = inode->i_atime = + inode->i_ctime = current_fs_time(sb); init_special_inode(inode, S_IFCHR|opts->mode, device); inode->i_private = priv;