diff options
Diffstat (limited to 'fs/afs/vlclient.c')
-rw-r--r-- | fs/afs/vlclient.c | 58 |
1 files changed, 23 insertions, 35 deletions
diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c index 7b0e3192ee39..dac9faa70ff4 100644 --- a/fs/afs/vlclient.c +++ b/fs/afs/vlclient.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* vlclient.c: AFS Volume Location Service client | 1 | /* AFS Volume Location Service client |
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) |
@@ -30,7 +30,6 @@ | |||
30 | static void afs_rxvl_get_entry_by_id_attn(struct rxrpc_call *call); | 30 | static void afs_rxvl_get_entry_by_id_attn(struct rxrpc_call *call); |
31 | static void afs_rxvl_get_entry_by_id_error(struct rxrpc_call *call); | 31 | static void afs_rxvl_get_entry_by_id_error(struct rxrpc_call *call); |
32 | 32 | ||
33 | /*****************************************************************************/ | ||
34 | /* | 33 | /* |
35 | * map afs VL abort codes to/from Linux error codes | 34 | * map afs VL abort codes to/from Linux error codes |
36 | * - called with call->lock held | 35 | * - called with call->lock held |
@@ -87,10 +86,9 @@ static void afs_rxvl_aemap(struct rxrpc_call *call) | |||
87 | default: | 86 | default: |
88 | return; | 87 | return; |
89 | } | 88 | } |
90 | } /* end afs_rxvl_aemap() */ | 89 | } |
91 | 90 | ||
92 | #if 0 | 91 | #if 0 |
93 | /*****************************************************************************/ | ||
94 | /* | 92 | /* |
95 | * probe a volume location server to see if it is still alive -- unused | 93 | * probe a volume location server to see if it is still alive -- unused |
96 | */ | 94 | */ |
@@ -159,24 +157,22 @@ static int afs_rxvl_probe(struct afs_server *server, int alloc_flags) | |||
159 | BUG(); | 157 | BUG(); |
160 | } | 158 | } |
161 | 159 | ||
162 | abort: | 160 | abort: |
163 | set_current_state(TASK_UNINTERRUPTIBLE); | 161 | set_current_state(TASK_UNINTERRUPTIBLE); |
164 | rxrpc_call_abort(call, ret); | 162 | rxrpc_call_abort(call, ret); |
165 | schedule(); | 163 | schedule(); |
166 | 164 | ||
167 | out_unwait: | 165 | out_unwait: |
168 | set_current_state(TASK_RUNNING); | 166 | set_current_state(TASK_RUNNING); |
169 | remove_wait_queue(&call->waitq, &myself); | 167 | remove_wait_queue(&call->waitq, &myself); |
170 | rxrpc_put_call(call); | 168 | rxrpc_put_call(call); |
171 | out_put_conn: | 169 | out_put_conn: |
172 | rxrpc_put_connection(conn); | 170 | rxrpc_put_connection(conn); |
173 | out: | 171 | out: |
174 | return ret; | 172 | return ret; |
175 | 173 | } | |
176 | } /* end afs_rxvl_probe() */ | ||
177 | #endif | 174 | #endif |
178 | 175 | ||
179 | /*****************************************************************************/ | ||
180 | /* | 176 | /* |
181 | * look up a volume location database entry by name | 177 | * look up a volume location database entry by name |
182 | */ | 178 | */ |
@@ -294,24 +290,23 @@ int afs_rxvl_get_entry_by_name(struct afs_server *server, | |||
294 | entry->rtime = get_seconds(); | 290 | entry->rtime = get_seconds(); |
295 | ret = 0; | 291 | ret = 0; |
296 | 292 | ||
297 | out_unwait: | 293 | out_unwait: |
298 | set_current_state(TASK_RUNNING); | 294 | set_current_state(TASK_RUNNING); |
299 | remove_wait_queue(&call->waitq, &myself); | 295 | remove_wait_queue(&call->waitq, &myself); |
300 | rxrpc_put_call(call); | 296 | rxrpc_put_call(call); |
301 | out_put_conn: | 297 | out_put_conn: |
302 | rxrpc_put_connection(conn); | 298 | rxrpc_put_connection(conn); |
303 | out: | 299 | out: |
304 | _leave(" = %d", ret); | 300 | _leave(" = %d", ret); |
305 | return ret; | 301 | return ret; |
306 | 302 | ||
307 | abort: | 303 | abort: |
308 | set_current_state(TASK_UNINTERRUPTIBLE); | 304 | set_current_state(TASK_UNINTERRUPTIBLE); |
309 | rxrpc_call_abort(call, ret); | 305 | rxrpc_call_abort(call, ret); |
310 | schedule(); | 306 | schedule(); |
311 | goto out_unwait; | 307 | goto out_unwait; |
312 | } /* end afs_rxvl_get_entry_by_name() */ | 308 | } |
313 | 309 | ||
314 | /*****************************************************************************/ | ||
315 | /* | 310 | /* |
316 | * look up a volume location database entry by ID | 311 | * look up a volume location database entry by ID |
317 | */ | 312 | */ |
@@ -434,24 +429,23 @@ int afs_rxvl_get_entry_by_id(struct afs_server *server, | |||
434 | entry->rtime = get_seconds(); | 429 | entry->rtime = get_seconds(); |
435 | ret = 0; | 430 | ret = 0; |
436 | 431 | ||
437 | out_unwait: | 432 | out_unwait: |
438 | set_current_state(TASK_RUNNING); | 433 | set_current_state(TASK_RUNNING); |
439 | remove_wait_queue(&call->waitq, &myself); | 434 | remove_wait_queue(&call->waitq, &myself); |
440 | rxrpc_put_call(call); | 435 | rxrpc_put_call(call); |
441 | out_put_conn: | 436 | out_put_conn: |
442 | rxrpc_put_connection(conn); | 437 | rxrpc_put_connection(conn); |
443 | out: | 438 | out: |
444 | _leave(" = %d", ret); | 439 | _leave(" = %d", ret); |
445 | return ret; | 440 | return ret; |
446 | 441 | ||
447 | abort: | 442 | abort: |
448 | set_current_state(TASK_UNINTERRUPTIBLE); | 443 | set_current_state(TASK_UNINTERRUPTIBLE); |
449 | rxrpc_call_abort(call, ret); | 444 | rxrpc_call_abort(call, ret); |
450 | schedule(); | 445 | schedule(); |
451 | goto out_unwait; | 446 | goto out_unwait; |
452 | } /* end afs_rxvl_get_entry_by_id() */ | 447 | } |
453 | 448 | ||
454 | /*****************************************************************************/ | ||
455 | /* | 449 | /* |
456 | * look up a volume location database entry by ID asynchronously | 450 | * look up a volume location database entry by ID asynchronously |
457 | */ | 451 | */ |
@@ -533,14 +527,12 @@ int afs_rxvl_get_entry_by_id_async(struct afs_async_op *op, | |||
533 | break; | 527 | break; |
534 | } | 528 | } |
535 | 529 | ||
536 | out: | 530 | out: |
537 | rxrpc_put_call(call); | 531 | rxrpc_put_call(call); |
538 | _leave(" = %d", ret); | 532 | _leave(" = %d", ret); |
539 | return ret; | 533 | return ret; |
534 | } | ||
540 | 535 | ||
541 | } /* end afs_rxvl_get_entry_by_id_async() */ | ||
542 | |||
543 | /*****************************************************************************/ | ||
544 | /* | 536 | /* |
545 | * attend to the asynchronous get VLDB entry by ID | 537 | * attend to the asynchronous get VLDB entry by ID |
546 | */ | 538 | */ |
@@ -630,14 +622,13 @@ int afs_rxvl_get_entry_by_id_async2(struct afs_async_op *op, | |||
630 | _leave(" = -EAGAIN"); | 622 | _leave(" = -EAGAIN"); |
631 | return -EAGAIN; | 623 | return -EAGAIN; |
632 | 624 | ||
633 | done: | 625 | done: |
634 | rxrpc_put_call(op->call); | 626 | rxrpc_put_call(op->call); |
635 | op->call = NULL; | 627 | op->call = NULL; |
636 | _leave(" = %d", ret); | 628 | _leave(" = %d", ret); |
637 | return ret; | 629 | return ret; |
638 | } /* end afs_rxvl_get_entry_by_id_async2() */ | 630 | } |
639 | 631 | ||
640 | /*****************************************************************************/ | ||
641 | /* | 632 | /* |
642 | * handle attention events on an async get-entry-by-ID op | 633 | * handle attention events on an async get-entry-by-ID op |
643 | * - called from krxiod | 634 | * - called from krxiod |
@@ -674,10 +665,8 @@ static void afs_rxvl_get_entry_by_id_attn(struct rxrpc_call *call) | |||
674 | } | 665 | } |
675 | 666 | ||
676 | _leave(""); | 667 | _leave(""); |
668 | } | ||
677 | 669 | ||
678 | } /* end afs_rxvl_get_entry_by_id_attn() */ | ||
679 | |||
680 | /*****************************************************************************/ | ||
681 | /* | 670 | /* |
682 | * handle error events on an async get-entry-by-ID op | 671 | * handle error events on an async get-entry-by-ID op |
683 | * - called from krxiod | 672 | * - called from krxiod |
@@ -691,5 +680,4 @@ static void afs_rxvl_get_entry_by_id_error(struct rxrpc_call *call) | |||
691 | afs_kafsasyncd_attend_op(op); | 680 | afs_kafsasyncd_attend_op(op); |
692 | 681 | ||
693 | _leave(""); | 682 | _leave(""); |
694 | 683 | } | |
695 | } /* end afs_rxvl_get_entry_by_id_error() */ | ||