From: Deepa Dinamani <deepa.kernel@gmail.com>
To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org,
Peter Hurley <peter@hurleysoftware.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Josh Triplett <josh@joshtriplett.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 3/8] fs: devpts: Replace CURRENT_TIME by current_fs_time()
Date: Mon, 22 Feb 2016 07:17:49 -0800 [thread overview]
Message-ID: <1456154274-30487-4-git-send-email-deepa.kernel@gmail.com> (raw)
In-Reply-To: <1456154274-30487-1-git-send-email-deepa.kernel@gmail.com>
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 <deepa.kernel@gmail.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
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;
--
1.9.1
next prev parent reply other threads:[~2016-02-22 15:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 15:17 [PATCH 0/8] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 2 Deepa Dinamani
2016-02-22 15:17 ` [PATCH 1/8] fs: debugfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani
2016-02-22 15:17 ` [PATCH 2/8] fs: logfs: " Deepa Dinamani
2016-02-22 15:17 ` Deepa Dinamani [this message]
2016-02-22 15:17 ` [PATCH 4/8] fs: configfs: " Deepa Dinamani
2016-02-24 9:02 ` Joel Becker
2016-02-26 9:45 ` stoph Hellwig
2016-02-22 15:17 ` [PATCH 5/8] fs: proc: " Deepa Dinamani
2016-02-22 15:17 ` [PATCH 6/8] fs: ramfs: " Deepa Dinamani
2016-02-22 15:17 ` [PATCH 7/8] fs: kernfs: " Deepa Dinamani
2016-02-22 15:17 ` [PATCH 8/8] net: sunrpc: " Deepa Dinamani
2016-02-22 15:34 ` Trond Myklebust
2016-02-22 15:47 ` Deepa Dinamani
2016-02-24 15:08 ` [Y2038] " Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456154274-30487-4-git-send-email-deepa.kernel@gmail.com \
--to=deepa.kernel@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=josh@joshtriplett.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=viro@zeniv.linux.org.uk \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.