diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-09-29 17:34:46 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:19:50 -0400 |
commit | 80eb209def76d375677840800eb838abce1e6639 (patch) | |
tree | 30b249f3c3bd61712ee2c0f52f79adb025a56862 | |
parent | a1643a92f6de92074116922a2d2906dd33499ff4 (diff) |
NFS: Remove NFS_I(inode)->data_updates
We have no more users...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/inode.c | 21 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 14 |
2 files changed, 7 insertions, 28 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index d722a0e84361..1d507a2a96d6 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -85,7 +85,6 @@ void nfs_clear_inode(struct inode *inode) | |||
85 | */ | 85 | */ |
86 | BUG_ON(nfs_have_writebacks(inode)); | 86 | BUG_ON(nfs_have_writebacks(inode)); |
87 | BUG_ON(!list_empty(&NFS_I(inode)->open_files)); | 87 | BUG_ON(!list_empty(&NFS_I(inode)->open_files)); |
88 | BUG_ON(atomic_read(&NFS_I(inode)->data_updates) != 0); | ||
89 | nfs_zap_acl_cache(inode); | 88 | nfs_zap_acl_cache(inode); |
90 | nfs_access_zap_cache(inode); | 89 | nfs_access_zap_cache(inode); |
91 | } | 90 | } |
@@ -757,16 +756,6 @@ out: | |||
757 | } | 756 | } |
758 | 757 | ||
759 | /** | 758 | /** |
760 | * nfs_begin_data_update | ||
761 | * @inode - pointer to inode | ||
762 | * Declare that a set of operations will update file data on the server | ||
763 | */ | ||
764 | void nfs_begin_data_update(struct inode *inode) | ||
765 | { | ||
766 | atomic_inc(&NFS_I(inode)->data_updates); | ||
767 | } | ||
768 | |||
769 | /** | ||
770 | * nfs_end_data_update | 759 | * nfs_end_data_update |
771 | * @inode - pointer to inode | 760 | * @inode - pointer to inode |
772 | * Declare end of the operations that will update file data | 761 | * Declare end of the operations that will update file data |
@@ -775,15 +764,12 @@ void nfs_begin_data_update(struct inode *inode) | |||
775 | */ | 764 | */ |
776 | void nfs_end_data_update(struct inode *inode) | 765 | void nfs_end_data_update(struct inode *inode) |
777 | { | 766 | { |
778 | struct nfs_inode *nfsi = NFS_I(inode); | ||
779 | |||
780 | /* Directories: invalidate page cache */ | 767 | /* Directories: invalidate page cache */ |
781 | if (S_ISDIR(inode->i_mode)) { | 768 | if (S_ISDIR(inode->i_mode)) { |
782 | spin_lock(&inode->i_lock); | 769 | spin_lock(&inode->i_lock); |
783 | nfsi->cache_validity |= NFS_INO_INVALID_DATA; | 770 | NFS_I(inode)->cache_validity |= NFS_INO_INVALID_DATA; |
784 | spin_unlock(&inode->i_lock); | 771 | spin_unlock(&inode->i_lock); |
785 | } | 772 | } |
786 | atomic_dec(&nfsi->data_updates); | ||
787 | } | 773 | } |
788 | 774 | ||
789 | static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr) | 775 | static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr) |
@@ -823,7 +809,6 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat | |||
823 | { | 809 | { |
824 | struct nfs_inode *nfsi = NFS_I(inode); | 810 | struct nfs_inode *nfsi = NFS_I(inode); |
825 | loff_t cur_size, new_isize; | 811 | loff_t cur_size, new_isize; |
826 | int data_unstable; | ||
827 | 812 | ||
828 | 813 | ||
829 | /* Has the inode gone and changed behind our back? */ | 814 | /* Has the inode gone and changed behind our back? */ |
@@ -832,9 +817,6 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat | |||
832 | return -EIO; | 817 | return -EIO; |
833 | } | 818 | } |
834 | 819 | ||
835 | /* Are we in the process of updating data on the server? */ | ||
836 | data_unstable = nfs_caches_unstable(inode); | ||
837 | |||
838 | /* Do atomic weak cache consistency updates */ | 820 | /* Do atomic weak cache consistency updates */ |
839 | nfs_wcc_update_inode(inode, fattr); | 821 | nfs_wcc_update_inode(inode, fattr); |
840 | 822 | ||
@@ -1162,7 +1144,6 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag | |||
1162 | INIT_LIST_HEAD(&nfsi->access_cache_entry_lru); | 1144 | INIT_LIST_HEAD(&nfsi->access_cache_entry_lru); |
1163 | INIT_LIST_HEAD(&nfsi->access_cache_inode_lru); | 1145 | INIT_LIST_HEAD(&nfsi->access_cache_inode_lru); |
1164 | INIT_RADIX_TREE(&nfsi->nfs_page_tree, GFP_ATOMIC); | 1146 | INIT_RADIX_TREE(&nfsi->nfs_page_tree, GFP_ATOMIC); |
1165 | atomic_set(&nfsi->data_updates, 0); | ||
1166 | nfsi->ncommit = 0; | 1147 | nfsi->ncommit = 0; |
1167 | nfsi->npages = 0; | 1148 | nfsi->npages = 0; |
1168 | nfs4_init_once(nfsi); | 1149 | nfs4_init_once(nfsi); |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c947803a7ba4..1b4edc6f7fd7 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -136,11 +136,6 @@ struct nfs_inode { | |||
136 | * server. | 136 | * server. |
137 | */ | 137 | */ |
138 | unsigned long cache_change_attribute; | 138 | unsigned long cache_change_attribute; |
139 | /* | ||
140 | * Counter indicating the number of outstanding requests that | ||
141 | * will cause a file data update. | ||
142 | */ | ||
143 | atomic_t data_updates; | ||
144 | 139 | ||
145 | struct rb_root access_cache; | 140 | struct rb_root access_cache; |
146 | struct list_head access_cache_entry_lru; | 141 | struct list_head access_cache_entry_lru; |
@@ -224,9 +219,13 @@ static inline struct nfs_inode *NFS_I(struct inode *inode) | |||
224 | 219 | ||
225 | #define NFS_FILEID(inode) (NFS_I(inode)->fileid) | 220 | #define NFS_FILEID(inode) (NFS_I(inode)->fileid) |
226 | 221 | ||
227 | static inline int nfs_caches_unstable(struct inode *inode) | 222 | /** |
223 | * nfs_begin_data_update | ||
224 | * @inode - pointer to inode | ||
225 | * Declare that a set of operations will update file data on the server | ||
226 | */ | ||
227 | static inline void nfs_begin_data_update(struct inode *inode) | ||
228 | { | 228 | { |
229 | return atomic_read(&NFS_I(inode)->data_updates) != 0; | ||
230 | } | 229 | } |
231 | 230 | ||
232 | static inline void nfs_mark_for_revalidate(struct inode *inode) | 231 | static inline void nfs_mark_for_revalidate(struct inode *inode) |
@@ -299,7 +298,6 @@ extern int nfs_setattr(struct dentry *, struct iattr *); | |||
299 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); | 298 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); |
300 | extern void nfs_begin_attr_update(struct inode *); | 299 | extern void nfs_begin_attr_update(struct inode *); |
301 | extern void nfs_end_attr_update(struct inode *); | 300 | extern void nfs_end_attr_update(struct inode *); |
302 | extern void nfs_begin_data_update(struct inode *); | ||
303 | extern void nfs_end_data_update(struct inode *); | 301 | extern void nfs_end_data_update(struct inode *); |
304 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 302 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
305 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 303 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |