aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/fsclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/afs/fsclient.c')
-rw-r--r--fs/afs/fsclient.c73
1 files changed, 32 insertions, 41 deletions
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c
index 61bc371532ab..f1c3a186842e 100644
--- a/fs/afs/fsclient.c
+++ b/fs/afs/fsclient.c
@@ -29,7 +29,6 @@
29#define FSGETROOTVOLUME 151 /* AFS Get root volume name */ 29#define FSGETROOTVOLUME 151 /* AFS Get root volume name */
30#define FSLOOKUP 161 /* AFS lookup file in directory */ 30#define FSLOOKUP 161 /* AFS lookup file in directory */
31 31
32/*****************************************************************************/
33/* 32/*
34 * map afs abort codes to/from Linux error codes 33 * map afs abort codes to/from Linux error codes
35 * - called with call->lock held 34 * - called with call->lock held
@@ -46,9 +45,8 @@ static void afs_rxfs_aemap(struct rxrpc_call *call)
46 default: 45 default:
47 break; 46 break;
48 } 47 }
49} /* end afs_rxfs_aemap() */ 48}
50 49
51/*****************************************************************************/
52/* 50/*
53 * get the root volume name from a fileserver 51 * get the root volume name from a fileserver
54 * - this operation doesn't seem to work correctly in OpenAFS server 1.2.2 52 * - this operation doesn't seem to work correctly in OpenAFS server 1.2.2
@@ -162,23 +160,22 @@ int afs_rxfs_get_root_volume(struct afs_server *server,
162 BUG(); 160 BUG();
163 } 161 }
164 162
165 abort: 163abort:
166 set_current_state(TASK_UNINTERRUPTIBLE); 164 set_current_state(TASK_UNINTERRUPTIBLE);
167 rxrpc_call_abort(call, ret); 165 rxrpc_call_abort(call, ret);
168 schedule(); 166 schedule();
169 out_unwait: 167out_unwait:
170 set_current_state(TASK_RUNNING); 168 set_current_state(TASK_RUNNING);
171 remove_wait_queue(&call->waitq, &myself); 169 remove_wait_queue(&call->waitq, &myself);
172 rxrpc_put_call(call); 170 rxrpc_put_call(call);
173 out_put_conn: 171out_put_conn:
174 afs_server_release_fsconn(server, conn); 172 afs_server_release_fsconn(server, conn);
175 out: 173out:
176 kleave(""); 174 kleave("");
177 return ret; 175 return ret;
178} /* end afs_rxfs_get_root_volume() */ 176}
179#endif 177#endif
180 178
181/*****************************************************************************/
182/* 179/*
183 * get information about a volume 180 * get information about a volume
184 */ 181 */
@@ -275,26 +272,24 @@ int afs_rxfs_get_volume_info(struct afs_server *server,
275 /* success */ 272 /* success */
276 ret = 0; 273 ret = 0;
277 274
278 out_unwait: 275out_unwait:
279 set_current_state(TASK_RUNNING); 276 set_current_state(TASK_RUNNING);
280 remove_wait_queue(&call->waitq, &myself); 277 remove_wait_queue(&call->waitq, &myself);
281 rxrpc_put_call(call); 278 rxrpc_put_call(call);
282 out_put_conn: 279out_put_conn:
283 afs_server_release_fsconn(server, conn); 280 afs_server_release_fsconn(server, conn);
284 out: 281out:
285 _leave(""); 282 _leave("");
286 return ret; 283 return ret;
287 284
288 abort: 285abort:
289 set_current_state(TASK_UNINTERRUPTIBLE); 286 set_current_state(TASK_UNINTERRUPTIBLE);
290 rxrpc_call_abort(call, ret); 287 rxrpc_call_abort(call, ret);
291 schedule(); 288 schedule();
292 goto out_unwait; 289 goto out_unwait;
293 290}
294} /* end afs_rxfs_get_volume_info() */
295#endif 291#endif
296 292
297/*****************************************************************************/
298/* 293/*
299 * fetch the status information for a file 294 * fetch the status information for a file
300 */ 295 */
@@ -401,24 +396,23 @@ int afs_rxfs_fetch_file_status(struct afs_server *server,
401 /* success */ 396 /* success */
402 ret = 0; 397 ret = 0;
403 398
404 out_unwait: 399out_unwait:
405 set_current_state(TASK_RUNNING); 400 set_current_state(TASK_RUNNING);
406 remove_wait_queue(&call->waitq, &myself); 401 remove_wait_queue(&call->waitq, &myself);
407 rxrpc_put_call(call); 402 rxrpc_put_call(call);
408 out_put_conn: 403out_put_conn:
409 afs_server_release_callslot(server, &callslot); 404 afs_server_release_callslot(server, &callslot);
410 out: 405out:
411 _leave(""); 406 _leave("");
412 return ret; 407 return ret;
413 408
414 abort: 409abort:
415 set_current_state(TASK_UNINTERRUPTIBLE); 410 set_current_state(TASK_UNINTERRUPTIBLE);
416 rxrpc_call_abort(call, ret); 411 rxrpc_call_abort(call, ret);
417 schedule(); 412 schedule();
418 goto out_unwait; 413 goto out_unwait;
419} /* end afs_rxfs_fetch_file_status() */ 414}
420 415
421/*****************************************************************************/
422/* 416/*
423 * fetch the contents of a file or directory 417 * fetch the contents of a file or directory
424 */ 418 */
@@ -547,31 +541,29 @@ int afs_rxfs_fetch_file_data(struct afs_server *server,
547 /* success */ 541 /* success */
548 ret = 0; 542 ret = 0;
549 543
550 out_unwait: 544out_unwait:
551 set_current_state(TASK_RUNNING); 545 set_current_state(TASK_RUNNING);
552 remove_wait_queue(&call->waitq,&myself); 546 remove_wait_queue(&call->waitq,&myself);
553 rxrpc_put_call(call); 547 rxrpc_put_call(call);
554 out_put_conn: 548out_put_conn:
555 afs_server_release_callslot(server, &callslot); 549 afs_server_release_callslot(server, &callslot);
556 out: 550out:
557 _leave(" = %d", ret); 551 _leave(" = %d", ret);
558 return ret; 552 return ret;
559 553
560 read_failed: 554read_failed:
561 if (ret == -ECONNABORTED) { 555 if (ret == -ECONNABORTED) {
562 ret = call->app_errno; 556 ret = call->app_errno;
563 goto out_unwait; 557 goto out_unwait;
564 } 558 }
565 559
566 abort: 560abort:
567 set_current_state(TASK_UNINTERRUPTIBLE); 561 set_current_state(TASK_UNINTERRUPTIBLE);
568 rxrpc_call_abort(call, ret); 562 rxrpc_call_abort(call, ret);
569 schedule(); 563 schedule();
570 goto out_unwait; 564 goto out_unwait;
565}
571 566
572} /* end afs_rxfs_fetch_file_data() */
573
574/*****************************************************************************/
575/* 567/*
576 * ask the AFS fileserver to discard a callback request on a file 568 * ask the AFS fileserver to discard a callback request on a file
577 */ 569 */
@@ -655,24 +647,23 @@ int afs_rxfs_give_up_callback(struct afs_server *server,
655 BUG(); 647 BUG();
656 } 648 }
657 649
658 out_unwait: 650out_unwait:
659 set_current_state(TASK_RUNNING); 651 set_current_state(TASK_RUNNING);
660 remove_wait_queue(&call->waitq, &myself); 652 remove_wait_queue(&call->waitq, &myself);
661 rxrpc_put_call(call); 653 rxrpc_put_call(call);
662 out_put_conn: 654out_put_conn:
663 afs_server_release_callslot(server, &callslot); 655 afs_server_release_callslot(server, &callslot);
664 out: 656out:
665 _leave(""); 657 _leave("");
666 return ret; 658 return ret;
667 659
668 abort: 660abort:
669 set_current_state(TASK_UNINTERRUPTIBLE); 661 set_current_state(TASK_UNINTERRUPTIBLE);
670 rxrpc_call_abort(call, ret); 662 rxrpc_call_abort(call, ret);
671 schedule(); 663 schedule();
672 goto out_unwait; 664 goto out_unwait;
673} /* end afs_rxfs_give_up_callback() */ 665}
674 666
675/*****************************************************************************/
676/* 667/*
677 * look a filename up in a directory 668 * look a filename up in a directory
678 * - this operation doesn't seem to work correctly in OpenAFS server 1.2.2 669 * - this operation doesn't seem to work correctly in OpenAFS server 1.2.2
@@ -818,20 +809,20 @@ int afs_rxfs_lookup(struct afs_server *server,
818 /* success */ 809 /* success */
819 ret = 0; 810 ret = 0;
820 811
821 out_unwait: 812out_unwait:
822 set_current_state(TASK_RUNNING); 813 set_current_state(TASK_RUNNING);
823 remove_wait_queue(&call->waitq, &myself); 814 remove_wait_queue(&call->waitq, &myself);
824 rxrpc_put_call(call); 815 rxrpc_put_call(call);
825 out_put_conn: 816out_put_conn:
826 afs_server_release_fsconn(server, conn); 817 afs_server_release_fsconn(server, conn);
827 out: 818out:
828 kleave(""); 819 kleave("");
829 return ret; 820 return ret;
830 821
831 abort: 822abort:
832 set_current_state(TASK_UNINTERRUPTIBLE); 823 set_current_state(TASK_UNINTERRUPTIBLE);
833 rxrpc_call_abort(call, ret); 824 rxrpc_call_abort(call, ret);
834 schedule(); 825 schedule();
835 goto out_unwait; 826 goto out_unwait;
836} /* end afs_rxfs_lookup() */ 827}
837#endif 828#endif