aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-09-28 19:22:40 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 17:20:23 -0400
commitc7c209730d635226b81e9aeae63b6dc8f445569f (patch)
tree0817778cf1b0504839f8a3e83797826fbf9acccc
parent4f48af45842c6e78ab958c90344d3c940db4da15 (diff)
NFS: Get rid of some obsolete macros
- NFS_READTIME, NFS_CHANGE_ATTR are completely unused. - Inline the few remaining uses of NFS_ATTRTIMEO, and remove. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/dir.c2
-rw-r--r--fs/nfs/inode.c4
-rw-r--r--include/linux/nfs_fs.h4
3 files changed, 3 insertions, 7 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index bdf4ba42abd7..a4fdc4cc306c 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1762,7 +1762,7 @@ static int nfs_access_get_cached(struct inode *inode, struct rpc_cred *cred, str
1762 cache = nfs_access_search_rbtree(inode, cred); 1762 cache = nfs_access_search_rbtree(inode, cred);
1763 if (cache == NULL) 1763 if (cache == NULL)
1764 goto out; 1764 goto out;
1765 if (!time_in_range(jiffies, cache->jiffies, cache->jiffies + NFS_ATTRTIMEO(inode))) 1765 if (!time_in_range(jiffies, cache->jiffies, cache->jiffies + nfsi->attrtimeo))
1766 goto out_stale; 1766 goto out_stale;
1767 res->jiffies = cache->jiffies; 1767 res->jiffies = cache->jiffies;
1768 res->cred = cache->cred; 1768 res->cred = cache->cred;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 9d012a6ee4cc..469387920dd9 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -117,8 +117,8 @@ static void nfs_zap_caches_locked(struct inode *inode)
117 117
118 nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE); 118 nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE);
119 119
120 NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode); 120 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
121 NFS_ATTRTIMEO_UPDATE(inode) = jiffies; 121 nfsi->attrtimeo_timestamp = jiffies;
122 122
123 memset(NFS_COOKIEVERF(inode), 0, sizeof(NFS_COOKIEVERF(inode))); 123 memset(NFS_COOKIEVERF(inode), 0, sizeof(NFS_COOKIEVERF(inode)));
124 if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) 124 if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 992931cd301e..12fe97bac9ff 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -203,16 +203,12 @@ static inline struct nfs_inode *NFS_I(struct inode *inode)
203#define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) 203#define NFS_CLIENT(inode) (NFS_SERVER(inode)->client)
204#define NFS_PROTO(inode) (NFS_SERVER(inode)->nfs_client->rpc_ops) 204#define NFS_PROTO(inode) (NFS_SERVER(inode)->nfs_client->rpc_ops)
205#define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf) 205#define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf)
206#define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies)
207#define NFS_CHANGE_ATTR(inode) (NFS_I(inode)->change_attr)
208#define NFS_ATTRTIMEO(inode) (NFS_I(inode)->attrtimeo)
209#define NFS_MINATTRTIMEO(inode) \ 206#define NFS_MINATTRTIMEO(inode) \
210 (S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmin \ 207 (S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmin \
211 : NFS_SERVER(inode)->acregmin) 208 : NFS_SERVER(inode)->acregmin)
212#define NFS_MAXATTRTIMEO(inode) \ 209#define NFS_MAXATTRTIMEO(inode) \
213 (S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmax \ 210 (S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmax \
214 : NFS_SERVER(inode)->acregmax) 211 : NFS_SERVER(inode)->acregmax)
215#define NFS_ATTRTIMEO_UPDATE(inode) (NFS_I(inode)->attrtimeo_timestamp)
216 212
217#define NFS_FLAGS(inode) (NFS_I(inode)->flags) 213#define NFS_FLAGS(inode) (NFS_I(inode)->flags)
218#define NFS_STALE(inode) (test_bit(NFS_INO_STALE, &NFS_FLAGS(inode))) 214#define NFS_STALE(inode) (test_bit(NFS_INO_STALE, &NFS_FLAGS(inode)))