aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/vnode.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/vnode.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/vnode.c')
-rw-r--r--fs/afs/vnode.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/fs/afs/vnode.c b/fs/afs/vnode.c
index cf62da5d7825..4ab1ed710286 100644
--- a/fs/afs/vnode.c
+++ b/fs/afs/vnode.c
@@ -1,4 +1,4 @@
1/* vnode.c: AFS vnode management 1/* AFS vnode management
2 * 2 *
3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com) 4 * Written by David Howells (dhowells@redhat.com)
@@ -43,7 +43,6 @@ struct cachefs_index_def afs_vnode_cache_index_def = {
43}; 43};
44#endif 44#endif
45 45
46/*****************************************************************************/
47/* 46/*
48 * handle a callback timing out 47 * handle a callback timing out
49 * TODO: retain a ref to vnode struct for an outstanding callback timeout 48 * TODO: retain a ref to vnode struct for an outstanding callback timeout
@@ -78,9 +77,8 @@ static void afs_vnode_cb_timed_out(struct afs_timer *timer)
78 afs_put_server(oldserver); 77 afs_put_server(oldserver);
79 78
80 _leave(""); 79 _leave("");
81} /* end afs_vnode_cb_timed_out() */ 80}
82 81
83/*****************************************************************************/
84/* 82/*
85 * finish off updating the recorded status of a file 83 * finish off updating the recorded status of a file
86 * - starts callback expiry timer 84 * - starts callback expiry timer
@@ -105,7 +103,7 @@ static void afs_vnode_finalise_status_update(struct afs_vnode *vnode,
105 103
106 spin_lock(&afs_cb_hash_lock); 104 spin_lock(&afs_cb_hash_lock);
107 list_move_tail(&vnode->cb_hash_link, 105 list_move_tail(&vnode->cb_hash_link,
108 &afs_cb_hash(server, &vnode->fid)); 106 &afs_cb_hash(server, &vnode->fid));
109 spin_unlock(&afs_cb_hash_lock); 107 spin_unlock(&afs_cb_hash_lock);
110 108
111 /* swap ref to old callback server with that for new callback 109 /* swap ref to old callback server with that for new callback
@@ -122,13 +120,11 @@ static void afs_vnode_finalise_status_update(struct afs_vnode *vnode,
122 spin_lock(&server->cb_lock); 120 spin_lock(&server->cb_lock);
123 list_add_tail(&vnode->cb_link, &server->cb_promises); 121 list_add_tail(&vnode->cb_link, &server->cb_promises);
124 spin_unlock(&server->cb_lock); 122 spin_unlock(&server->cb_lock);
125 } 123 } else {
126 else {
127 /* same server */ 124 /* same server */
128 oldserver = NULL; 125 oldserver = NULL;
129 } 126 }
130 } 127 } else if (ret == -ENOENT) {
131 else if (ret == -ENOENT) {
132 /* the file was deleted - clear the callback timeout */ 128 /* the file was deleted - clear the callback timeout */
133 oldserver = xchg(&vnode->cb_server, NULL); 129 oldserver = xchg(&vnode->cb_server, NULL);
134 afs_kafstimod_del_timer(&vnode->cb_timeout); 130 afs_kafstimod_del_timer(&vnode->cb_timeout);
@@ -146,10 +142,8 @@ static void afs_vnode_finalise_status_update(struct afs_vnode *vnode,
146 afs_put_server(oldserver); 142 afs_put_server(oldserver);
147 143
148 _leave(""); 144 _leave("");
145}
149 146
150} /* end afs_vnode_finalise_status_update() */
151
152/*****************************************************************************/
153/* 147/*
154 * fetch file status from the volume 148 * fetch file status from the volume
155 * - don't issue a fetch if: 149 * - don't issue a fetch if:
@@ -222,7 +216,7 @@ int afs_vnode_fetch_status(struct afs_vnode *vnode)
222 return vnode->flags & AFS_VNODE_DELETED ? -ENOENT : 0; 216 return vnode->flags & AFS_VNODE_DELETED ? -ENOENT : 0;
223 } 217 }
224 218
225 get_anyway: 219get_anyway:
226 /* okay... we're going to have to initiate the op */ 220 /* okay... we're going to have to initiate the op */
227 vnode->update_cnt++; 221 vnode->update_cnt++;
228 222
@@ -247,9 +241,8 @@ int afs_vnode_fetch_status(struct afs_vnode *vnode)
247 241
248 _leave(" = %d", ret); 242 _leave(" = %d", ret);
249 return ret; 243 return ret;
250} /* end afs_vnode_fetch_status() */ 244}
251 245
252/*****************************************************************************/
253/* 246/*
254 * fetch file data from the volume 247 * fetch file data from the volume
255 * - TODO implement caching and server failover 248 * - TODO implement caching and server failover
@@ -290,10 +283,8 @@ int afs_vnode_fetch_data(struct afs_vnode *vnode,
290 283
291 _leave(" = %d", ret); 284 _leave(" = %d", ret);
292 return ret; 285 return ret;
286}
293 287
294} /* end afs_vnode_fetch_data() */
295
296/*****************************************************************************/
297/* 288/*
298 * break any outstanding callback on a vnode 289 * break any outstanding callback on a vnode
299 * - only relevent to server that issued it 290 * - only relevent to server that issued it
@@ -337,9 +328,8 @@ int afs_vnode_give_up_callback(struct afs_vnode *vnode)
337 328
338 _leave(" = %d", ret); 329 _leave(" = %d", ret);
339 return ret; 330 return ret;
340} /* end afs_vnode_give_up_callback() */ 331}
341 332
342/*****************************************************************************/
343/* 333/*
344 * match a vnode record stored in the cache 334 * match a vnode record stored in the cache
345 */ 335 */
@@ -371,10 +361,9 @@ static cachefs_match_val_t afs_vnode_cache_match(void *target,
371 361
372 _leave(" = SUCCESS"); 362 _leave(" = SUCCESS");
373 return CACHEFS_MATCH_SUCCESS; 363 return CACHEFS_MATCH_SUCCESS;
374} /* end afs_vnode_cache_match() */ 364}
375#endif 365#endif
376 366
377/*****************************************************************************/
378/* 367/*
379 * update a vnode record stored in the cache 368 * update a vnode record stored in the cache
380 */ 369 */
@@ -389,6 +378,5 @@ static void afs_vnode_cache_update(void *source, void *entry)
389 cvnode->vnode_id = vnode->fid.vnode; 378 cvnode->vnode_id = vnode->fid.vnode;
390 cvnode->vnode_unique = vnode->fid.unique; 379 cvnode->vnode_unique = vnode->fid.unique;
391 cvnode->data_version = vnode->status.version; 380 cvnode->data_version = vnode->status.version;
392 381}
393} /* end afs_vnode_cache_update() */
394#endif 382#endif