diff options
author | Benny Halevy <bhalevy@panasas.com> | 2008-01-23 01:58:59 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-30 02:06:11 -0500 |
commit | 3a10c30acc4821ca000b52ed0edafd0d3bf26a52 (patch) | |
tree | 535fe870e12f9a032112b16d4e31fe1d813ea2c3 | |
parent | fc6014771bde8a215a9a4ea24b45f76afeb3c922 (diff) |
nfs: obliterate NFS_FLAGS macro
use NFS_I(inode)->flags instead
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/dir.c | 8 | ||||
-rw-r--r-- | fs/nfs/inode.c | 6 | ||||
-rw-r--r-- | fs/nfs/read.c | 2 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 5 |
4 files changed, 10 insertions, 11 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 72d141a0dbd8..c578d942f000 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -192,7 +192,7 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page) | |||
192 | /* We requested READDIRPLUS, but the server doesn't grok it */ | 192 | /* We requested READDIRPLUS, but the server doesn't grok it */ |
193 | if (error == -ENOTSUPP && desc->plus) { | 193 | if (error == -ENOTSUPP && desc->plus) { |
194 | NFS_SERVER(inode)->caps &= ~NFS_CAP_READDIRPLUS; | 194 | NFS_SERVER(inode)->caps &= ~NFS_CAP_READDIRPLUS; |
195 | clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); | 195 | clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_I(inode)->flags); |
196 | desc->plus = 0; | 196 | desc->plus = 0; |
197 | goto again; | 197 | goto again; |
198 | } | 198 | } |
@@ -577,7 +577,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
577 | break; | 577 | break; |
578 | } | 578 | } |
579 | if (res == -ETOOSMALL && desc->plus) { | 579 | if (res == -ETOOSMALL && desc->plus) { |
580 | clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); | 580 | clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_I(inode)->flags); |
581 | nfs_zap_caches(inode); | 581 | nfs_zap_caches(inode); |
582 | desc->plus = 0; | 582 | desc->plus = 0; |
583 | desc->entry->eof = 0; | 583 | desc->entry->eof = 0; |
@@ -1760,7 +1760,7 @@ static void __nfs_access_zap_cache(struct inode *inode) | |||
1760 | void nfs_access_zap_cache(struct inode *inode) | 1760 | void nfs_access_zap_cache(struct inode *inode) |
1761 | { | 1761 | { |
1762 | /* Remove from global LRU init */ | 1762 | /* Remove from global LRU init */ |
1763 | if (test_and_clear_bit(NFS_INO_ACL_LRU_SET, &NFS_FLAGS(inode))) { | 1763 | if (test_and_clear_bit(NFS_INO_ACL_LRU_SET, &NFS_I(inode)->flags)) { |
1764 | spin_lock(&nfs_access_lru_lock); | 1764 | spin_lock(&nfs_access_lru_lock); |
1765 | list_del_init(&NFS_I(inode)->access_cache_inode_lru); | 1765 | list_del_init(&NFS_I(inode)->access_cache_inode_lru); |
1766 | spin_unlock(&nfs_access_lru_lock); | 1766 | spin_unlock(&nfs_access_lru_lock); |
@@ -1874,7 +1874,7 @@ static void nfs_access_add_cache(struct inode *inode, struct nfs_access_entry *s | |||
1874 | smp_mb__after_atomic_inc(); | 1874 | smp_mb__after_atomic_inc(); |
1875 | 1875 | ||
1876 | /* Add inode to global LRU list */ | 1876 | /* Add inode to global LRU list */ |
1877 | if (!test_and_set_bit(NFS_INO_ACL_LRU_SET, &NFS_FLAGS(inode))) { | 1877 | if (!test_and_set_bit(NFS_INO_ACL_LRU_SET, &NFS_I(inode)->flags)) { |
1878 | spin_lock(&nfs_access_lru_lock); | 1878 | spin_lock(&nfs_access_lru_lock); |
1879 | list_add_tail(&NFS_I(inode)->access_cache_inode_lru, &nfs_access_lru_list); | 1879 | list_add_tail(&NFS_I(inode)->access_cache_inode_lru, &nfs_access_lru_list); |
1880 | spin_unlock(&nfs_access_lru_lock); | 1880 | spin_unlock(&nfs_access_lru_lock); |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 5747d49bdd76..9d7b08c43865 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -192,7 +192,7 @@ void nfs_invalidate_atime(struct inode *inode) | |||
192 | */ | 192 | */ |
193 | static void nfs_invalidate_inode(struct inode *inode) | 193 | static void nfs_invalidate_inode(struct inode *inode) |
194 | { | 194 | { |
195 | set_bit(NFS_INO_STALE, &NFS_FLAGS(inode)); | 195 | set_bit(NFS_INO_STALE, &NFS_I(inode)->flags); |
196 | nfs_zap_caches_locked(inode); | 196 | nfs_zap_caches_locked(inode); |
197 | } | 197 | } |
198 | 198 | ||
@@ -291,7 +291,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) | |||
291 | inode->i_fop = &nfs_dir_operations; | 291 | inode->i_fop = &nfs_dir_operations; |
292 | if (nfs_server_capable(inode, NFS_CAP_READDIRPLUS) | 292 | if (nfs_server_capable(inode, NFS_CAP_READDIRPLUS) |
293 | && fattr->size <= NFS_LIMIT_READDIRPLUS) | 293 | && fattr->size <= NFS_LIMIT_READDIRPLUS) |
294 | set_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); | 294 | set_bit(NFS_INO_ADVISE_RDPLUS, &NFS_I(inode)->flags); |
295 | /* Deal with crossing mountpoints */ | 295 | /* Deal with crossing mountpoints */ |
296 | if (!nfs_fsid_equal(&NFS_SB(sb)->fsid, &fattr->fsid)) { | 296 | if (!nfs_fsid_equal(&NFS_SB(sb)->fsid, &fattr->fsid)) { |
297 | if (fattr->valid & NFS_ATTR_FATTR_V4_REFERRAL) | 297 | if (fattr->valid & NFS_ATTR_FATTR_V4_REFERRAL) |
@@ -668,7 +668,7 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode) | |||
668 | if (status == -ESTALE) { | 668 | if (status == -ESTALE) { |
669 | nfs_zap_caches(inode); | 669 | nfs_zap_caches(inode); |
670 | if (!S_ISDIR(inode->i_mode)) | 670 | if (!S_ISDIR(inode->i_mode)) |
671 | set_bit(NFS_INO_STALE, &NFS_FLAGS(inode)); | 671 | set_bit(NFS_INO_STALE, &NFS_I(inode)->flags); |
672 | } | 672 | } |
673 | goto out; | 673 | goto out; |
674 | } | 674 | } |
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index efc121c494fe..8fd6dfbe1bc3 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -336,7 +336,7 @@ int nfs_readpage_result(struct rpc_task *task, struct nfs_read_data *data) | |||
336 | nfs_add_stats(data->inode, NFSIOS_SERVERREADBYTES, data->res.count); | 336 | nfs_add_stats(data->inode, NFSIOS_SERVERREADBYTES, data->res.count); |
337 | 337 | ||
338 | if (task->tk_status == -ESTALE) { | 338 | if (task->tk_status == -ESTALE) { |
339 | set_bit(NFS_INO_STALE, &NFS_FLAGS(data->inode)); | 339 | set_bit(NFS_INO_STALE, &NFS_I(data->inode)->flags); |
340 | nfs_mark_for_revalidate(data->inode); | 340 | nfs_mark_for_revalidate(data->inode); |
341 | } | 341 | } |
342 | return 0; | 342 | return 0; |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 7095aaa087d8..9e7c24a2aca9 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -214,8 +214,7 @@ static inline struct nfs_inode *NFS_I(struct inode *inode) | |||
214 | (S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmax \ | 214 | (S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmax \ |
215 | : NFS_SERVER(inode)->acregmax) | 215 | : NFS_SERVER(inode)->acregmax) |
216 | 216 | ||
217 | #define NFS_FLAGS(inode) (NFS_I(inode)->flags) | 217 | #define NFS_STALE(inode) (test_bit(NFS_INO_STALE, &NFS_I(inode)->flags)) |
218 | #define NFS_STALE(inode) (test_bit(NFS_INO_STALE, &NFS_FLAGS(inode))) | ||
219 | 218 | ||
220 | #define NFS_FILEID(inode) (NFS_I(inode)->fileid) | 219 | #define NFS_FILEID(inode) (NFS_I(inode)->fileid) |
221 | 220 | ||
@@ -237,7 +236,7 @@ static inline int nfs_server_capable(struct inode *inode, int cap) | |||
237 | 236 | ||
238 | static inline int NFS_USE_READDIRPLUS(struct inode *inode) | 237 | static inline int NFS_USE_READDIRPLUS(struct inode *inode) |
239 | { | 238 | { |
240 | return test_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); | 239 | return test_bit(NFS_INO_ADVISE_RDPLUS, &NFS_I(inode)->flags); |
241 | } | 240 | } |
242 | 241 | ||
243 | static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) | 242 | static inline void nfs_set_verifier(struct dentry * dentry, unsigned long verf) |