]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
NFS: Clean up nfs_attribute_timeout()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 16 Dec 2016 23:51:15 +0000 (18:51 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 19 Dec 2016 22:29:44 +0000 (17:29 -0500)
It can be made static.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/inode.c
include/linux/nfs_fs.h

index 8224e96b5808d4d191fe975697efd244409ac2cb..a0cd79646c1b6eebed8b63fab94184855c9992ae 100644 (file)
@@ -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 @@ out:
        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))
index fe2e7810ae809c694d41ea2cb8ae459973dc3281..f1da8c8dd473869897c3363f9e299bd28086c8d5 100644 (file)
@@ -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 *);