1 /* Maintain an RxRPC server socket to do AFS communications through
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include <linux/slab.h>
13 #include <linux/sched/signal.h>
16 #include <net/af_rxrpc.h>
20 struct workqueue_struct
*afs_async_calls
;
22 static void afs_wake_up_call_waiter(struct sock
*, struct rxrpc_call
*, unsigned long);
23 static long afs_wait_for_call_to_complete(struct afs_call
*, struct afs_addr_cursor
*);
24 static void afs_wake_up_async_call(struct sock
*, struct rxrpc_call
*, unsigned long);
25 static void afs_process_async_call(struct work_struct
*);
26 static void afs_rx_new_call(struct sock
*, struct rxrpc_call
*, unsigned long);
27 static void afs_rx_discard_new_call(struct rxrpc_call
*, unsigned long);
28 static int afs_deliver_cm_op_id(struct afs_call
*);
30 /* asynchronous incoming call initial processing */
31 static const struct afs_call_type afs_RXCMxxxx
= {
33 .deliver
= afs_deliver_cm_op_id
,
37 * open an RxRPC socket and bind it to be a server for callback notifications
38 * - the socket is left in blocking mode and non-blocking ops use MSG_DONTWAIT
40 int afs_open_socket(struct afs_net
*net
)
42 struct sockaddr_rxrpc srx
;
43 struct socket
*socket
;
44 unsigned int min_level
;
49 ret
= sock_create_kern(net
->net
, AF_RXRPC
, SOCK_DGRAM
, PF_INET6
, &socket
);
53 socket
->sk
->sk_allocation
= GFP_NOFS
;
55 /* bind the callback manager's address to make this a server socket */
56 memset(&srx
, 0, sizeof(srx
));
57 srx
.srx_family
= AF_RXRPC
;
58 srx
.srx_service
= CM_SERVICE
;
59 srx
.transport_type
= SOCK_DGRAM
;
60 srx
.transport_len
= sizeof(srx
.transport
.sin6
);
61 srx
.transport
.sin6
.sin6_family
= AF_INET6
;
62 srx
.transport
.sin6
.sin6_port
= htons(AFS_CM_PORT
);
64 min_level
= RXRPC_SECURITY_ENCRYPT
;
65 ret
= kernel_setsockopt(socket
, SOL_RXRPC
, RXRPC_MIN_SECURITY_LEVEL
,
66 (void *)&min_level
, sizeof(min_level
));
70 ret
= kernel_bind(socket
, (struct sockaddr
*) &srx
, sizeof(srx
));
71 if (ret
== -EADDRINUSE
) {
72 srx
.transport
.sin6
.sin6_port
= 0;
73 ret
= kernel_bind(socket
, (struct sockaddr
*) &srx
, sizeof(srx
));
78 rxrpc_kernel_new_call_notification(socket
, afs_rx_new_call
,
79 afs_rx_discard_new_call
);
81 ret
= kernel_listen(socket
, INT_MAX
);
86 afs_charge_preallocation(&net
->charge_preallocation_work
);
98 * close the RxRPC socket AFS was using
100 void afs_close_socket(struct afs_net
*net
)
104 kernel_listen(net
->socket
, 0);
105 flush_workqueue(afs_async_calls
);
107 if (net
->spare_incoming_call
) {
108 afs_put_call(net
->spare_incoming_call
);
109 net
->spare_incoming_call
= NULL
;
112 _debug("outstanding %u", atomic_read(&net
->nr_outstanding_calls
));
113 wait_var_event(&net
->nr_outstanding_calls
,
114 !atomic_read(&net
->nr_outstanding_calls
));
115 _debug("no outstanding calls");
117 kernel_sock_shutdown(net
->socket
, SHUT_RDWR
);
118 flush_workqueue(afs_async_calls
);
119 sock_release(net
->socket
);
128 static struct afs_call
*afs_alloc_call(struct afs_net
*net
,
129 const struct afs_call_type
*type
,
132 struct afs_call
*call
;
135 call
= kzalloc(sizeof(*call
), gfp
);
141 call
->debug_id
= atomic_inc_return(&rxrpc_debug_id
);
142 atomic_set(&call
->usage
, 1);
143 INIT_WORK(&call
->async_work
, afs_process_async_call
);
144 init_waitqueue_head(&call
->waitq
);
145 spin_lock_init(&call
->state_lock
);
146 call
->_iter
= &call
->iter
;
148 o
= atomic_inc_return(&net
->nr_outstanding_calls
);
149 trace_afs_call(call
, afs_call_trace_alloc
, 1, o
,
150 __builtin_return_address(0));
155 * Dispose of a reference on a call.
157 void afs_put_call(struct afs_call
*call
)
159 struct afs_net
*net
= call
->net
;
160 int n
= atomic_dec_return(&call
->usage
);
161 int o
= atomic_read(&net
->nr_outstanding_calls
);
163 trace_afs_call(call
, afs_call_trace_put
, n
+ 1, o
,
164 __builtin_return_address(0));
168 ASSERT(!work_pending(&call
->async_work
));
169 ASSERT(call
->type
->name
!= NULL
);
172 rxrpc_kernel_end_call(net
->socket
, call
->rxcall
);
175 if (call
->type
->destructor
)
176 call
->type
->destructor(call
);
178 afs_put_server(call
->net
, call
->cm_server
);
179 afs_put_cb_interest(call
->net
, call
->cbi
);
180 kfree(call
->request
);
182 trace_afs_call(call
, afs_call_trace_free
, 0, o
,
183 __builtin_return_address(0));
186 o
= atomic_dec_return(&net
->nr_outstanding_calls
);
188 wake_up_var(&net
->nr_outstanding_calls
);
193 * Queue the call for actual work. Returns 0 unconditionally for convenience.
195 int afs_queue_call_work(struct afs_call
*call
)
197 int u
= atomic_inc_return(&call
->usage
);
199 trace_afs_call(call
, afs_call_trace_work
, u
,
200 atomic_read(&call
->net
->nr_outstanding_calls
),
201 __builtin_return_address(0));
203 INIT_WORK(&call
->work
, call
->type
->work
);
205 if (!queue_work(afs_wq
, &call
->work
))
211 * allocate a call with flat request and reply buffers
213 struct afs_call
*afs_alloc_flat_call(struct afs_net
*net
,
214 const struct afs_call_type
*type
,
215 size_t request_size
, size_t reply_max
)
217 struct afs_call
*call
;
219 call
= afs_alloc_call(net
, type
, GFP_NOFS
);
224 call
->request_size
= request_size
;
225 call
->request
= kmalloc(request_size
, GFP_NOFS
);
231 call
->reply_max
= reply_max
;
232 call
->buffer
= kmalloc(reply_max
, GFP_NOFS
);
237 afs_extract_to_buf(call
, call
->reply_max
);
238 call
->operation_ID
= type
->op
;
239 init_waitqueue_head(&call
->waitq
);
249 * clean up a call with flat buffer
251 void afs_flat_call_destructor(struct afs_call
*call
)
255 kfree(call
->request
);
256 call
->request
= NULL
;
261 #define AFS_BVEC_MAX 8
264 * Load the given bvec with the next few pages.
266 static void afs_load_bvec(struct afs_call
*call
, struct msghdr
*msg
,
267 struct bio_vec
*bv
, pgoff_t first
, pgoff_t last
,
270 struct page
*pages
[AFS_BVEC_MAX
];
271 unsigned int nr
, n
, i
, to
, bytes
= 0;
273 nr
= min_t(pgoff_t
, last
- first
+ 1, AFS_BVEC_MAX
);
274 n
= find_get_pages_contig(call
->mapping
, first
, nr
, pages
);
275 ASSERTCMP(n
, ==, nr
);
277 msg
->msg_flags
|= MSG_MORE
;
278 for (i
= 0; i
< nr
; i
++) {
280 if (first
+ i
>= last
) {
282 msg
->msg_flags
&= ~MSG_MORE
;
284 bv
[i
].bv_page
= pages
[i
];
285 bv
[i
].bv_len
= to
- offset
;
286 bv
[i
].bv_offset
= offset
;
287 bytes
+= to
- offset
;
291 iov_iter_bvec(&msg
->msg_iter
, WRITE
, bv
, nr
, bytes
);
295 * Advance the AFS call state when the RxRPC call ends the transmit phase.
297 static void afs_notify_end_request_tx(struct sock
*sock
,
298 struct rxrpc_call
*rxcall
,
299 unsigned long call_user_ID
)
301 struct afs_call
*call
= (struct afs_call
*)call_user_ID
;
303 afs_set_call_state(call
, AFS_CALL_CL_REQUESTING
, AFS_CALL_CL_AWAIT_REPLY
);
307 * attach the data from a bunch of pages on an inode to a call
309 static int afs_send_pages(struct afs_call
*call
, struct msghdr
*msg
)
311 struct bio_vec bv
[AFS_BVEC_MAX
];
312 unsigned int bytes
, nr
, loop
, offset
;
313 pgoff_t first
= call
->first
, last
= call
->last
;
316 offset
= call
->first_offset
;
317 call
->first_offset
= 0;
320 afs_load_bvec(call
, msg
, bv
, first
, last
, offset
);
321 trace_afs_send_pages(call
, msg
, first
, last
, offset
);
324 bytes
= msg
->msg_iter
.count
;
325 nr
= msg
->msg_iter
.nr_segs
;
327 ret
= rxrpc_kernel_send_data(call
->net
->socket
, call
->rxcall
, msg
,
328 bytes
, afs_notify_end_request_tx
);
329 for (loop
= 0; loop
< nr
; loop
++)
330 put_page(bv
[loop
].bv_page
);
335 } while (first
<= last
);
337 trace_afs_sent_pages(call
, call
->first
, last
, first
, ret
);
344 long afs_make_call(struct afs_addr_cursor
*ac
, struct afs_call
*call
,
345 gfp_t gfp
, bool async
)
347 struct sockaddr_rxrpc
*srx
= ac
->addr
;
348 struct rxrpc_call
*rxcall
;
354 _enter(",{%pISp},", &srx
->transport
);
356 ASSERT(call
->type
!= NULL
);
357 ASSERT(call
->type
->name
!= NULL
);
359 _debug("____MAKE %p{%s,%x} [%d]____",
360 call
, call
->type
->name
, key_serial(call
->key
),
361 atomic_read(&call
->net
->nr_outstanding_calls
));
365 /* Work out the length we're going to transmit. This is awkward for
366 * calls such as FS.StoreData where there's an extra injection of data
367 * after the initial fixed part.
369 tx_total_len
= call
->request_size
;
370 if (call
->send_pages
) {
371 if (call
->last
== call
->first
) {
372 tx_total_len
+= call
->last_to
- call
->first_offset
;
374 /* It looks mathematically like you should be able to
375 * combine the following lines with the ones above, but
376 * unsigned arithmetic is fun when it wraps...
378 tx_total_len
+= PAGE_SIZE
- call
->first_offset
;
379 tx_total_len
+= call
->last_to
;
380 tx_total_len
+= (call
->last
- call
->first
- 1) * PAGE_SIZE
;
385 rxcall
= rxrpc_kernel_begin_call(call
->net
->socket
, srx
, call
->key
,
389 afs_wake_up_async_call
:
390 afs_wake_up_call_waiter
),
393 if (IS_ERR(rxcall
)) {
394 ret
= PTR_ERR(rxcall
);
395 goto error_kill_call
;
398 call
->rxcall
= rxcall
;
400 /* send the request */
401 iov
[0].iov_base
= call
->request
;
402 iov
[0].iov_len
= call
->request_size
;
406 iov_iter_kvec(&msg
.msg_iter
, WRITE
, iov
, 1, call
->request_size
);
407 msg
.msg_control
= NULL
;
408 msg
.msg_controllen
= 0;
409 msg
.msg_flags
= MSG_WAITALL
| (call
->send_pages
? MSG_MORE
: 0);
411 ret
= rxrpc_kernel_send_data(call
->net
->socket
, rxcall
,
412 &msg
, call
->request_size
,
413 afs_notify_end_request_tx
);
417 if (call
->send_pages
) {
418 ret
= afs_send_pages(call
, &msg
);
423 /* at this point, an async call may no longer exist as it may have
424 * already completed */
428 return afs_wait_for_call_to_complete(call
, ac
);
431 call
->state
= AFS_CALL_COMPLETE
;
432 if (ret
!= -ECONNABORTED
) {
433 rxrpc_kernel_abort_call(call
->net
->socket
, rxcall
,
434 RX_USER_ABORT
, ret
, "KSD");
436 iov_iter_kvec(&msg
.msg_iter
, READ
, NULL
, 0, 0);
437 rxrpc_kernel_recv_data(call
->net
->socket
, rxcall
,
438 &msg
.msg_iter
, false,
439 &call
->abort_code
, &call
->service_id
);
440 ac
->abort_code
= call
->abort_code
;
441 ac
->responded
= true;
444 trace_afs_call_done(call
);
448 _leave(" = %d", ret
);
453 * deliver messages to a call
455 static void afs_deliver_to_call(struct afs_call
*call
)
457 enum afs_call_state state
;
458 u32 abort_code
, remote_abort
= 0;
461 _enter("%s", call
->type
->name
);
463 while (state
= READ_ONCE(call
->state
),
464 state
== AFS_CALL_CL_AWAIT_REPLY
||
465 state
== AFS_CALL_SV_AWAIT_OP_ID
||
466 state
== AFS_CALL_SV_AWAIT_REQUEST
||
467 state
== AFS_CALL_SV_AWAIT_ACK
469 if (state
== AFS_CALL_SV_AWAIT_ACK
) {
470 iov_iter_kvec(&call
->iter
, READ
, NULL
, 0, 0);
471 ret
= rxrpc_kernel_recv_data(call
->net
->socket
,
472 call
->rxcall
, &call
->iter
,
473 false, &remote_abort
,
475 trace_afs_receive_data(call
, &call
->iter
, false, ret
);
477 if (ret
== -EINPROGRESS
|| ret
== -EAGAIN
)
479 if (ret
< 0 || ret
== 1) {
487 ret
= call
->type
->deliver(call
);
488 state
= READ_ONCE(call
->state
);
491 if (state
== AFS_CALL_CL_PROC_REPLY
) {
493 set_bit(AFS_SERVER_FL_MAY_HAVE_CB
,
494 &call
->cbi
->server
->flags
);
497 ASSERTCMP(state
, >, AFS_CALL_CL_PROC_REPLY
);
504 ASSERTCMP(state
, ==, AFS_CALL_COMPLETE
);
507 abort_code
= RXGEN_OPCODE
;
508 rxrpc_kernel_abort_call(call
->net
->socket
, call
->rxcall
,
509 abort_code
, ret
, "KIV");
515 abort_code
= RXGEN_CC_UNMARSHAL
;
516 if (state
!= AFS_CALL_CL_AWAIT_REPLY
)
517 abort_code
= RXGEN_SS_UNMARSHAL
;
518 rxrpc_kernel_abort_call(call
->net
->socket
, call
->rxcall
,
519 abort_code
, ret
, "KUM");
525 if (state
== AFS_CALL_COMPLETE
&& call
->incoming
)
534 afs_set_call_complete(call
, ret
, remote_abort
);
535 state
= AFS_CALL_COMPLETE
;
540 * wait synchronously for a call to complete
542 static long afs_wait_for_call_to_complete(struct afs_call
*call
,
543 struct afs_addr_cursor
*ac
)
545 signed long rtt2
, timeout
;
550 DECLARE_WAITQUEUE(myself
, current
);
554 rtt
= rxrpc_kernel_get_rtt(call
->net
->socket
, call
->rxcall
);
555 rtt2
= nsecs_to_jiffies64(rtt
) * 2;
560 last_life
= rxrpc_kernel_check_life(call
->net
->socket
, call
->rxcall
);
562 add_wait_queue(&call
->waitq
, &myself
);
564 set_current_state(TASK_UNINTERRUPTIBLE
);
566 /* deliver any messages that are in the queue */
567 if (!afs_check_call_state(call
, AFS_CALL_COMPLETE
) &&
568 call
->need_attention
) {
569 call
->need_attention
= false;
570 __set_current_state(TASK_RUNNING
);
571 afs_deliver_to_call(call
);
575 if (afs_check_call_state(call
, AFS_CALL_COMPLETE
))
578 life
= rxrpc_kernel_check_life(call
->net
->socket
, call
->rxcall
);
580 life
== last_life
&& signal_pending(current
))
583 if (life
!= last_life
) {
588 timeout
= schedule_timeout(timeout
);
591 remove_wait_queue(&call
->waitq
, &myself
);
592 __set_current_state(TASK_RUNNING
);
594 /* Kill off the call if it's still live. */
595 if (!afs_check_call_state(call
, AFS_CALL_COMPLETE
)) {
596 _debug("call interrupted");
597 if (rxrpc_kernel_abort_call(call
->net
->socket
, call
->rxcall
,
598 RX_USER_ABORT
, -EINTR
, "KWI"))
599 afs_set_call_complete(call
, -EINTR
, 0);
602 spin_lock_bh(&call
->state_lock
);
603 ac
->abort_code
= call
->abort_code
;
604 ac
->error
= call
->error
;
605 spin_unlock_bh(&call
->state_lock
);
610 if (call
->ret_reply0
) {
611 ret
= (long)call
->reply
[0];
612 call
->reply
[0] = NULL
;
616 ac
->responded
= true;
620 _debug("call complete");
622 _leave(" = %p", (void *)ret
);
627 * wake up a waiting call
629 static void afs_wake_up_call_waiter(struct sock
*sk
, struct rxrpc_call
*rxcall
,
630 unsigned long call_user_ID
)
632 struct afs_call
*call
= (struct afs_call
*)call_user_ID
;
634 call
->need_attention
= true;
635 wake_up(&call
->waitq
);
639 * wake up an asynchronous call
641 static void afs_wake_up_async_call(struct sock
*sk
, struct rxrpc_call
*rxcall
,
642 unsigned long call_user_ID
)
644 struct afs_call
*call
= (struct afs_call
*)call_user_ID
;
647 trace_afs_notify_call(rxcall
, call
);
648 call
->need_attention
= true;
650 u
= atomic_fetch_add_unless(&call
->usage
, 1, 0);
652 trace_afs_call(call
, afs_call_trace_wake
, u
,
653 atomic_read(&call
->net
->nr_outstanding_calls
),
654 __builtin_return_address(0));
656 if (!queue_work(afs_async_calls
, &call
->async_work
))
662 * Delete an asynchronous call. The work item carries a ref to the call struct
663 * that we need to release.
665 static void afs_delete_async_call(struct work_struct
*work
)
667 struct afs_call
*call
= container_of(work
, struct afs_call
, async_work
);
677 * Perform I/O processing on an asynchronous call. The work item carries a ref
678 * to the call struct that we either need to release or to pass on.
680 static void afs_process_async_call(struct work_struct
*work
)
682 struct afs_call
*call
= container_of(work
, struct afs_call
, async_work
);
686 if (call
->state
< AFS_CALL_COMPLETE
&& call
->need_attention
) {
687 call
->need_attention
= false;
688 afs_deliver_to_call(call
);
691 if (call
->state
== AFS_CALL_COMPLETE
) {
692 /* We have two refs to release - one from the alloc and one
693 * queued with the work item - and we can't just deallocate the
694 * call because the work item may be queued again.
696 call
->async_work
.func
= afs_delete_async_call
;
697 if (!queue_work(afs_async_calls
, &call
->async_work
))
705 static void afs_rx_attach(struct rxrpc_call
*rxcall
, unsigned long user_call_ID
)
707 struct afs_call
*call
= (struct afs_call
*)user_call_ID
;
709 call
->rxcall
= rxcall
;
713 * Charge the incoming call preallocation.
715 void afs_charge_preallocation(struct work_struct
*work
)
717 struct afs_net
*net
=
718 container_of(work
, struct afs_net
, charge_preallocation_work
);
719 struct afs_call
*call
= net
->spare_incoming_call
;
723 call
= afs_alloc_call(net
, &afs_RXCMxxxx
, GFP_KERNEL
);
728 call
->state
= AFS_CALL_SV_AWAIT_OP_ID
;
729 init_waitqueue_head(&call
->waitq
);
730 afs_extract_to_tmp(call
);
733 if (rxrpc_kernel_charge_accept(net
->socket
,
734 afs_wake_up_async_call
,
742 net
->spare_incoming_call
= call
;
746 * Discard a preallocated call when a socket is shut down.
748 static void afs_rx_discard_new_call(struct rxrpc_call
*rxcall
,
749 unsigned long user_call_ID
)
751 struct afs_call
*call
= (struct afs_call
*)user_call_ID
;
758 * Notification of an incoming call.
760 static void afs_rx_new_call(struct sock
*sk
, struct rxrpc_call
*rxcall
,
761 unsigned long user_call_ID
)
763 struct afs_net
*net
= afs_sock2net(sk
);
765 queue_work(afs_wq
, &net
->charge_preallocation_work
);
769 * Grab the operation ID from an incoming cache manager call. The socket
770 * buffer is discarded on error or if we don't yet have sufficient data.
772 static int afs_deliver_cm_op_id(struct afs_call
*call
)
776 _enter("{%zu}", iov_iter_count(call
->_iter
));
778 /* the operation ID forms the first four bytes of the request data */
779 ret
= afs_extract_data(call
, true);
783 call
->operation_ID
= ntohl(call
->tmp
);
784 afs_set_call_state(call
, AFS_CALL_SV_AWAIT_OP_ID
, AFS_CALL_SV_AWAIT_REQUEST
);
786 /* ask the cache manager to route the call (it'll change the call type
788 if (!afs_cm_incoming_call(call
))
791 trace_afs_cb_call(call
);
793 /* pass responsibility for the remainer of this message off to the
794 * cache manager op */
795 return call
->type
->deliver(call
);
799 * Advance the AFS call state when an RxRPC service call ends the transmit
802 static void afs_notify_end_reply_tx(struct sock
*sock
,
803 struct rxrpc_call
*rxcall
,
804 unsigned long call_user_ID
)
806 struct afs_call
*call
= (struct afs_call
*)call_user_ID
;
808 afs_set_call_state(call
, AFS_CALL_SV_REPLYING
, AFS_CALL_SV_AWAIT_ACK
);
812 * send an empty reply
814 void afs_send_empty_reply(struct afs_call
*call
)
816 struct afs_net
*net
= call
->net
;
821 rxrpc_kernel_set_tx_length(net
->socket
, call
->rxcall
, 0);
825 iov_iter_kvec(&msg
.msg_iter
, WRITE
, NULL
, 0, 0);
826 msg
.msg_control
= NULL
;
827 msg
.msg_controllen
= 0;
830 switch (rxrpc_kernel_send_data(net
->socket
, call
->rxcall
, &msg
, 0,
831 afs_notify_end_reply_tx
)) {
833 _leave(" [replied]");
838 rxrpc_kernel_abort_call(net
->socket
, call
->rxcall
,
839 RX_USER_ABORT
, -ENOMEM
, "KOO");
847 * send a simple reply
849 void afs_send_simple_reply(struct afs_call
*call
, const void *buf
, size_t len
)
851 struct afs_net
*net
= call
->net
;
858 rxrpc_kernel_set_tx_length(net
->socket
, call
->rxcall
, len
);
860 iov
[0].iov_base
= (void *) buf
;
861 iov
[0].iov_len
= len
;
864 iov_iter_kvec(&msg
.msg_iter
, WRITE
, iov
, 1, len
);
865 msg
.msg_control
= NULL
;
866 msg
.msg_controllen
= 0;
869 n
= rxrpc_kernel_send_data(net
->socket
, call
->rxcall
, &msg
, len
,
870 afs_notify_end_reply_tx
);
873 _leave(" [replied]");
879 rxrpc_kernel_abort_call(net
->socket
, call
->rxcall
,
880 RX_USER_ABORT
, -ENOMEM
, "KOO");
886 * Extract a piece of data from the received data socket buffers.
888 int afs_extract_data(struct afs_call
*call
, bool want_more
)
890 struct afs_net
*net
= call
->net
;
891 struct iov_iter
*iter
= call
->_iter
;
892 enum afs_call_state state
;
893 u32 remote_abort
= 0;
896 _enter("{%s,%zu},%d", call
->type
->name
, iov_iter_count(iter
), want_more
);
898 ret
= rxrpc_kernel_recv_data(net
->socket
, call
->rxcall
, iter
,
899 want_more
, &remote_abort
,
901 if (ret
== 0 || ret
== -EAGAIN
)
904 state
= READ_ONCE(call
->state
);
907 case AFS_CALL_CL_AWAIT_REPLY
:
908 afs_set_call_state(call
, state
, AFS_CALL_CL_PROC_REPLY
);
910 case AFS_CALL_SV_AWAIT_REQUEST
:
911 afs_set_call_state(call
, state
, AFS_CALL_SV_REPLYING
);
913 case AFS_CALL_COMPLETE
:
914 kdebug("prem complete %d", call
->error
);
922 afs_set_call_complete(call
, ret
, remote_abort
);
927 * Log protocol error production.
929 noinline
int afs_protocol_error(struct afs_call
*call
, int error
,
930 enum afs_eproto_cause cause
)
932 trace_afs_protocol_error(call
, error
, cause
);