aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/inode.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-04-26 18:49:28 -0400
committerDavid S. Miller <davem@davemloft.net>2007-04-26 18:49:28 -0400
commitec26815ad847dbf74a1e27aa5515fb7d5dc6ee6f (patch)
tree32510ab35b3524f6be9231ab8065b80be5d9b68d /fs/afs/inode.c
parent17926a79320afa9b95df6b977b40cca6d8713cea (diff)
[AFS]: Clean up the AFS sources
Clean up the AFS sources. Also remove references to AFS keys. RxRPC keys are used instead. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/afs/inode.c')
-rw-r--r--fs/afs/inode.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index 9d9bca6c28b5..900c8bb1c3b8 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -29,7 +29,6 @@ struct afs_iget_data {
29 struct afs_volume *volume; /* volume on which resides */ 29 struct afs_volume *volume; /* volume on which resides */
30}; 30};
31 31
32/*****************************************************************************/
33/* 32/*
34 * map the AFS file status to the inode member variables 33 * map the AFS file status to the inode member variables
35 */ 34 */
@@ -87,9 +86,8 @@ static int afs_inode_map_status(struct afs_vnode *vnode)
87 } 86 }
88 87
89 return 0; 88 return 0;
90} /* end afs_inode_map_status() */ 89}
91 90
92/*****************************************************************************/
93/* 91/*
94 * attempt to fetch the status of an inode, coelescing multiple simultaneous 92 * attempt to fetch the status of an inode, coelescing multiple simultaneous
95 * fetches 93 * fetches
@@ -107,10 +105,8 @@ static int afs_inode_fetch_status(struct inode *inode)
107 ret = afs_inode_map_status(vnode); 105 ret = afs_inode_map_status(vnode);
108 106
109 return ret; 107 return ret;
108}
110 109
111} /* end afs_inode_fetch_status() */
112
113/*****************************************************************************/
114/* 110/*
115 * iget5() comparator 111 * iget5() comparator
116 */ 112 */
@@ -120,9 +116,8 @@ static int afs_iget5_test(struct inode *inode, void *opaque)
120 116
121 return inode->i_ino == data->fid.vnode && 117 return inode->i_ino == data->fid.vnode &&
122 inode->i_version == data->fid.unique; 118 inode->i_version == data->fid.unique;
123} /* end afs_iget5_test() */ 119}
124 120
125/*****************************************************************************/
126/* 121/*
127 * iget5() inode initialiser 122 * iget5() inode initialiser
128 */ 123 */
@@ -137,9 +132,8 @@ static int afs_iget5_set(struct inode *inode, void *opaque)
137 vnode->volume = data->volume; 132 vnode->volume = data->volume;
138 133
139 return 0; 134 return 0;
140} /* end afs_iget5_set() */ 135}
141 136
142/*****************************************************************************/
143/* 137/*
144 * inode retrieval 138 * inode retrieval
145 */ 139 */
@@ -169,7 +163,7 @@ inline int afs_iget(struct super_block *sb, struct afs_fid *fid,
169 /* deal with an existing inode */ 163 /* deal with an existing inode */
170 if (!(inode->i_state & I_NEW)) { 164 if (!(inode->i_state & I_NEW)) {
171 ret = afs_vnode_fetch_status(vnode); 165 ret = afs_vnode_fetch_status(vnode);
172 if (ret==0) 166 if (ret == 0)
173 *_inode = inode; 167 *_inode = inode;
174 else 168 else
175 iput(inode); 169 iput(inode);
@@ -204,16 +198,15 @@ inline int afs_iget(struct super_block *sb, struct afs_fid *fid,
204 return 0; 198 return 0;
205 199
206 /* failure */ 200 /* failure */
207 bad_inode: 201bad_inode:
208 make_bad_inode(inode); 202 make_bad_inode(inode);
209 unlock_new_inode(inode); 203 unlock_new_inode(inode);
210 iput(inode); 204 iput(inode);
211 205
212 _leave(" = %d [bad]", ret); 206 _leave(" = %d [bad]", ret);
213 return ret; 207 return ret;
214} /* end afs_iget() */ 208}
215 209
216/*****************************************************************************/
217/* 210/*
218 * read the attributes of an inode 211 * read the attributes of an inode
219 */ 212 */
@@ -235,8 +228,7 @@ int afs_inode_getattr(struct vfsmount *mnt, struct dentry *dentry,
235 _leave(" = %d [%d %p]", 228 _leave(" = %d [%d %p]",
236 ret, atomic_read(&dentry->d_count), dentry->d_inode); 229 ret, atomic_read(&dentry->d_count), dentry->d_inode);
237 return ret; 230 return ret;
238 } 231 } else if (ret < 0) {
239 else if (ret < 0) {
240 make_bad_inode(inode); 232 make_bad_inode(inode);
241 _leave(" = %d", ret); 233 _leave(" = %d", ret);
242 return ret; 234 return ret;
@@ -252,9 +244,8 @@ int afs_inode_getattr(struct vfsmount *mnt, struct dentry *dentry,
252 vnode->cb_type); 244 vnode->cb_type);
253 245
254 return 0; 246 return 0;
255} /* end afs_inode_getattr() */ 247}
256 248
257/*****************************************************************************/
258/* 249/*
259 * clear an AFS inode 250 * clear an AFS inode
260 */ 251 */
@@ -282,4 +273,4 @@ void afs_clear_inode(struct inode *inode)
282#endif 273#endif
283 274
284 _leave(""); 275 _leave("");
285} /* end afs_clear_inode() */ 276}