diff options
Diffstat (limited to 'net/rxrpc/call_object.c')
-rw-r--r-- | net/rxrpc/call_object.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 8aa2937b069f..fe96881a334d 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c | |||
@@ -604,30 +604,30 @@ void rxrpc_destroy_all_calls(struct rxrpc_net *rxnet) | |||
604 | 604 | ||
605 | _enter(""); | 605 | _enter(""); |
606 | 606 | ||
607 | if (list_empty(&rxnet->calls)) | 607 | if (!list_empty(&rxnet->calls)) { |
608 | return; | 608 | write_lock(&rxnet->call_lock); |
609 | 609 | ||
610 | write_lock(&rxnet->call_lock); | 610 | while (!list_empty(&rxnet->calls)) { |
611 | call = list_entry(rxnet->calls.next, | ||
612 | struct rxrpc_call, link); | ||
613 | _debug("Zapping call %p", call); | ||
611 | 614 | ||
612 | while (!list_empty(&rxnet->calls)) { | 615 | rxrpc_see_call(call); |
613 | call = list_entry(rxnet->calls.next, struct rxrpc_call, link); | 616 | list_del_init(&call->link); |
614 | _debug("Zapping call %p", call); | ||
615 | 617 | ||
616 | rxrpc_see_call(call); | 618 | pr_err("Call %p still in use (%d,%s,%lx,%lx)!\n", |
617 | list_del_init(&call->link); | 619 | call, atomic_read(&call->usage), |
620 | rxrpc_call_states[call->state], | ||
621 | call->flags, call->events); | ||
618 | 622 | ||
619 | pr_err("Call %p still in use (%d,%s,%lx,%lx)!\n", | 623 | write_unlock(&rxnet->call_lock); |
620 | call, atomic_read(&call->usage), | 624 | cond_resched(); |
621 | rxrpc_call_states[call->state], | 625 | write_lock(&rxnet->call_lock); |
622 | call->flags, call->events); | 626 | } |
623 | 627 | ||
624 | write_unlock(&rxnet->call_lock); | 628 | write_unlock(&rxnet->call_lock); |
625 | cond_resched(); | ||
626 | write_lock(&rxnet->call_lock); | ||
627 | } | 629 | } |
628 | 630 | ||
629 | write_unlock(&rxnet->call_lock); | ||
630 | |||
631 | atomic_dec(&rxnet->nr_calls); | 631 | atomic_dec(&rxnet->nr_calls); |
632 | wait_var_event(&rxnet->nr_calls, !atomic_read(&rxnet->nr_calls)); | 632 | wait_var_event(&rxnet->nr_calls, !atomic_read(&rxnet->nr_calls)); |
633 | } | 633 | } |