public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Deepa Dinamani <deepa.kernel@gmail•com>
To: linux-fsdevel@vger•kernel.org, y2038@lists•linaro.org
Cc: linux-nfs@vger•kernel.org, Arnd Bergmann <arnd@arndb•de>,
	netdev@vger•kernel.org,
	Trond Myklebust <trond.myklebust@primarydata•com>,
	linux-kernel@vger•kernel.org,
	"David S. Miller" <davem@davemloft•net>,
	"J. Bruce Fields" <bfields@fieldses•org>,
	Jeff Layton <jlayton@poochiereds•net>,
	Anna Schumaker <anna.schumaker@netapp•com>
Subject: [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time()
Date: Mon, 22 Feb 2016 07:17:54 -0800	[thread overview]
Message-ID: <1456154274-30487-9-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: "J. Bruce Fields" <bfields@fieldses•org>
Cc: Jeff Layton <jlayton@poochiereds•net>
Cc: Trond Myklebust <trond.myklebust@primarydata•com>
Cc: Anna Schumaker <anna.schumaker@netapp•com>
Cc: "David S. Miller" <davem@davemloft•net>
Cc: linux-nfs@vger•kernel.org
Cc: netdev@vger•kernel.org
---
 net/sunrpc/rpc_pipe.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 31789ef..bab3187 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -477,7 +477,9 @@ rpc_get_inode(struct super_block *sb, umode_t mode)
 		return NULL;
 	inode->i_ino = get_next_ino();
 	inode->i_mode = mode;
-	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+	inode->i_atime = current_fs_time(sb);
+	inode->i_mtime = inode->i_atime;
+	inode->i_ctime = inode->i_atime;
 	switch (mode & S_IFMT) {
 	case S_IFDIR:
 		inode->i_fop = &simple_dir_operations;
-- 
1.9.1

_______________________________________________
Y2038 mailing list
Y2038@lists•linaro.org
https://lists.linaro.org/mailman/listinfo/y2038

       reply	other threads:[~2016-02-22 15:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1456154274-30487-1-git-send-email-deepa.kernel@gmail.com>
2016-02-22 15:17 ` Deepa Dinamani [this message]
2016-02-22 15:34   ` [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time() Trond Myklebust
2016-02-22 15:47     ` Deepa Dinamani
     [not found]     ` <CAHQdGtR26gqy7GzWui-bnb+W5W1PnUL_=okBZwz+XFmj_Q4A3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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-9-git-send-email-deepa.kernel@gmail.com \
    --to=deepa.kernel@gmail$(echo .)com \
    --cc=anna.schumaker@netapp$(echo .)com \
    --cc=arnd@arndb$(echo .)de \
    --cc=bfields@fieldses$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=jlayton@poochiereds$(echo .)net \
    --cc=linux-fsdevel@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-nfs@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=trond.myklebust@primarydata$(echo .)com \
    --cc=y2038@lists$(echo .)linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox