All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@primarydata.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 9/9] NFS: Clean up nfs_attribute_timeout()
Date: Sat, 17 Dec 2016 13:27:11 -0500	[thread overview]
Message-ID: <20161217182711.10643-10-trond.myklebust@primarydata.com> (raw)
In-Reply-To: <20161217182711.10643-9-trond.myklebust@primarydata.com>

It can be made static.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/inode.c         | 14 +++++++-------
 include/linux/nfs_fs.h |  1 -
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 8224e96b5808..a0cd79646c1b 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -160,6 +160,13 @@ int nfs_sync_mapping(struct address_space *mapping)
 	return ret;
 }
 
+static int nfs_attribute_timeout(struct inode *inode)
+{
+	struct nfs_inode *nfsi = NFS_I(inode);
+
+	return !time_in_range_open(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo);
+}
+
 static bool nfs_check_cache_invalid_delegated(struct inode *inode, unsigned long flags)
 {
 	unsigned long cache_validity = READ_ONCE(NFS_I(inode)->cache_validity);
@@ -1076,13 +1083,6 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
 	return status;
 }
 
-int nfs_attribute_timeout(struct inode *inode)
-{
-	struct nfs_inode *nfsi = NFS_I(inode);
-
-	return !time_in_range_open(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo);
-}
-
 int nfs_attribute_cache_expired(struct inode *inode)
 {
 	if (nfs_have_delegated_attributes(inode))
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index fe2e7810ae80..f1da8c8dd473 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -340,7 +340,6 @@ extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *);
 extern void nfs_access_set_mask(struct nfs_access_entry *, u32);
 extern int nfs_permission(struct inode *, int);
 extern int nfs_open(struct inode *, struct file *);
-extern int nfs_attribute_timeout(struct inode *inode);
 extern int nfs_attribute_cache_expired(struct inode *inode);
 extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
 extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
-- 
2.9.3


  reply	other threads:[~2016-12-17 18:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17 18:27 [PATCH 0/9] NFS client attribute cache performance improvements Trond Myklebust
2016-12-17 18:27 ` [PATCH 1/9] NFSv4: Don't invalidate the directory twice Trond Myklebust
2016-12-17 18:27   ` [PATCH 2/9] NFSv4: Update the attribute cache info in update_changeattr Trond Myklebust
2016-12-17 18:27     ` [PATCH 3/9] NFSv4: Don't discard the attributes returned by asynchronous DELEGRETURN Trond Myklebust
2016-12-17 18:27       ` [PATCH 4/9] NFS: Don't revalidate the file on close if we hold a delegation Trond Myklebust
2016-12-17 18:27         ` [PATCH 5/9] NFS: Clean up cache validity checking Trond Myklebust
2016-12-17 18:27           ` [PATCH 6/9] NFS: Only look at the change attribute cache state in nfs_weak_revalidate() Trond Myklebust
2016-12-17 18:27             ` [PATCH 7/9] NFS: Fix and clean up the access cache validity checking Trond Myklebust
2016-12-17 18:27               ` [PATCH 8/9] NFS: Remove unused function nfs_revalidate_inode_rcu() Trond Myklebust
2016-12-17 18:27                 ` Trond Myklebust [this message]
2016-12-19 16:54   ` [PATCH 1/9] NFSv4: Don't invalidate the directory twice Anna Schumaker
2016-12-19 16:56     ` Trond Myklebust
2016-12-19 17:00       ` Trond Myklebust
2016-12-19 17:07       ` Anna Schumaker
2016-12-19 17:30         ` Trond Myklebust
2016-12-19 19:05           ` Anna Schumaker

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=20161217182711.10643-10-trond.myklebust@primarydata.com \
    --to=trond.myklebust@primarydata.com \
    --cc=linux-nfs@vger.kernel.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.