rxrpc: Make rxrpc_kernel_check_life() indicate if call completed

Make rxrpc_kernel_check_life() pass back the life counter through the
argument list and return true if the call has not yet completed.

Suggested-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Marc Dionne
2019-04-12 16:33:47 +01:00
committed by David S. Miller
parent 56d282d9db
commit 4611da30d6
4 changed files with 23 additions and 15 deletions

View File

@@ -621,7 +621,7 @@ static long afs_wait_for_call_to_complete(struct afs_call *call,
rtt2 = 2;
timeout = rtt2;
last_life = rxrpc_kernel_check_life(call->net->socket, call->rxcall);
rxrpc_kernel_check_life(call->net->socket, call->rxcall, &last_life);
add_wait_queue(&call->waitq, &myself);
for (;;) {
@@ -639,7 +639,7 @@ static long afs_wait_for_call_to_complete(struct afs_call *call,
if (afs_check_call_state(call, AFS_CALL_COMPLETE))
break;
life = rxrpc_kernel_check_life(call->net->socket, call->rxcall);
rxrpc_kernel_check_life(call->net->socket, call->rxcall, &life);
if (timeout == 0 &&
life == last_life && signal_pending(current)) {
if (stalled)