Return-Path: Received: from mail-ob0-f174.google.com ([209.85.214.174]:33609 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474AbcBVPec (ORCPT ); Mon, 22 Feb 2016 10:34:32 -0500 Received: by mail-ob0-f174.google.com with SMTP id jq7so168136741obb.0 for ; Mon, 22 Feb 2016 07:34:32 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1456154274-30487-9-git-send-email-deepa.kernel@gmail.com> References: <1456154274-30487-1-git-send-email-deepa.kernel@gmail.com> <1456154274-30487-9-git-send-email-deepa.kernel@gmail.com> Date: Mon, 22 Feb 2016 10:34:31 -0500 Message-ID: Subject: Re: [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time() From: Trond Myklebust To: Deepa Dinamani Cc: Linux FS-devel Mailing List , y2038@lists.linaro.org, Arnd Bergmann , Linux Kernel Mailing List , "J. Bruce Fields" , Jeff Layton , Anna Schumaker , "David S. Miller" , Linux NFS Mailing List , Linux Network Devel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: On Mon, Feb 22, 2016 at 10:17 AM, Deepa Dinamani wrote: > > 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: "J. Bruce Fields" > Cc: Jeff Layton > Cc: Trond Myklebust > Cc: Anna Schumaker > Cc: "David S. Miller" > 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; Why would we care? This is a pseudo-fs. There is no expectation w.r.t. timestamp accuracy or resolution. Cheers, Trond