Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1339629

[PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time()

Path csiph.com!news.mixmin.net!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod
From Deepa Dinamani <deepa.kernel@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time()
Date Mon, 22 Feb 2016 16:30:02 +0100
Message-ID <r50AW-7F1-7@gated-at.bofh.it> (permalink)
References <r50rf-7B2-1@gated-at.bofh.it>
X-Original-To linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org
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=TZc426RUcjzsYLGpXhf5Hu9T5mUdczqwWaI+K+dVBjo=; b=scesXe30rjV3hET9+8rciWszUrKE6UFkPsoz0xvO0WX0qjj2olLJPhNhaK5RlvMPfi TS1ddEmfSNHK8KTq0xOePm309QalIjvXDnH87bwBv86mre+Cu2whUzLAwoXKxkQ1QqKA NZhGs086ZwDtgAWQV50F1FAlamJpGsjlJ6p35gPXOGElp0/ieuLRBORWmmYIWmvl8OnU CuAR/3BankmAT44DQ5HzIp4eTb8PnX0dzDm8CrFzdNbHOLsalNwBfAjcG8AX9fc2zqkq fv3kdOJjarPiTdEzEV2v4orVBk2Yr3AN25eMjQBpIYJuj5F3cPfQLcMZoP3oUNVE/ytg 4iQA==
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=TZc426RUcjzsYLGpXhf5Hu9T5mUdczqwWaI+K+dVBjo=; b=X9ndxROU4U2zObNHEH3Q3cv5QQwqdZBoIGg+yJba49gPXiiT/WiyrOhhxwnx4Fbtnt 4iPk6BaGFCbYBVrBDOgQqG1SvERyZedcEUmCsTeq4LeiA8V486EZTZG1I1isHVO862/s BENNE/0VTXyoMO6rmA7che7CgzzgUwXzLYyZYpCIPUPRWtrvfPlwbjXJ/NWWSL5SmRbd MBt+RBw3645KiRU0OgsFNfRNev591Chl/xsdewGhyJ4yj7CoSeCh+jENNJl6PNw+QeYb xBrbq36kmFGFR7t7z9qq+GLGUUVO0vWqLwrTqbadrpu85JHyPsb46ht+pD3YGOC8isf8 Z61A==
X-Gm-Message-State AG10YOR0yq8alUpwOHI+5ABLXsaNHWauMnom22Y8Q16XS444roIQ7hnLnK5haOzDEP1Flg==
X-Received by 10.66.101.36 with SMTP id fd4mr39338898pab.76.1456154646727; Mon, 22 Feb 2016 07:24:06 -0800 (PST)
X-Mailer git-send-email 1.9.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 33
Organization linux.* mail to news gateway
X-Original-Cc Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org, "J. Bruce Fields" <bfields@fieldses.org>, Jeff Layton <jlayton@poochiereds.net>, Trond Myklebust <trond.myklebust@primarydata.com>, Anna Schumaker <anna.schumaker@netapp.com>, "David S. Miller" <davem@davemloft.net>, linux-nfs@vger.kernel.org, netdev@vger.kernel.org
X-Original-Date Mon, 22 Feb 2016 07:17:54 -0800
X-Original-Message-ID <1456154274-30487-9-git-send-email-deepa.kernel@gmail.com>
X-Original-References <1456154274-30487-1-git-send-email-deepa.kernel@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1339629

Show key headers only | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 2 Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:20 +0100
  [PATCH 1/8] fs: debugfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:30 +0100
  [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:30 +0100
    Re: [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time() Trond Myklebust <trond.myklebust@primarydata.com> - 2016-02-22 16:40 +0100
      Re: [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:50 +0100
      Re: [Y2038] [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time() Arnd Bergmann <arnd@arndb.de> - 2016-02-24 16:10 +0100
  [PATCH 7/8] fs: kernfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:30 +0100
  [PATCH 3/8] fs: devpts: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:30 +0100
  [PATCH 6/8] fs: ramfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:30 +0100
  [PATCH 4/8] fs: configfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:30 +0100
    Re: [PATCH 4/8] fs: configfs: Replace CURRENT_TIME by  current_fs_time() Joel Becker <jlbec@evilplan.org> - 2016-02-24 10:10 +0100
    Re: [PATCH 4/8] fs: configfs: Replace CURRENT_TIME by  current_fs_time() stoph Hellwig <hch@lst.de> - 2016-02-26 10:50 +0100
  [PATCH 5/8] fs: proc: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:30 +0100
  [PATCH 2/8] fs: logfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-02-22 16:30 +0100

csiph-web