File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -831,6 +831,7 @@ void rxrpc_clean_up_local_conns(struct rxrpc_local *);
831831 * conn_event.c
832832 */
833833void rxrpc_process_connection (struct work_struct * );
834+ void rxrpc_process_delayed_final_acks (struct rxrpc_connection * , bool );
834835
835836/*
836837 * conn_object.c
Original file line number Diff line number Diff line change @@ -901,11 +901,14 @@ static void rxrpc_unbundle_conn(struct rxrpc_connection *conn)
901901 struct rxrpc_bundle * bundle = conn -> bundle ;
902902 struct rxrpc_local * local = bundle -> params .local ;
903903 unsigned int bindex ;
904- bool need_drop = false;
904+ bool need_drop = false, need_put = false ;
905905 int i ;
906906
907907 _enter ("C=%x" , conn -> debug_id );
908908
909+ if (conn -> flags & RXRPC_CONN_FINAL_ACK_MASK )
910+ rxrpc_process_delayed_final_acks (conn , true);
911+
909912 spin_lock (& bundle -> channel_lock );
910913 bindex = conn -> bundle_shift / RXRPC_MAXCALLS ;
911914 if (bundle -> conns [bindex ] == conn ) {
@@ -928,10 +931,11 @@ static void rxrpc_unbundle_conn(struct rxrpc_connection *conn)
928931 if (i == ARRAY_SIZE (bundle -> conns ) && !bundle -> params .exclusive ) {
929932 _debug ("erase bundle" );
930933 rb_erase (& bundle -> local_node , & local -> client_bundles );
934+ need_put = true;
931935 }
932936
933937 spin_unlock (& local -> client_bundles_lock );
934- if (i == ARRAY_SIZE ( bundle -> conns ) )
938+ if (need_put )
935939 rxrpc_put_bundle (bundle );
936940 }
937941
Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ static void rxrpc_secure_connection(struct rxrpc_connection *conn)
397397/*
398398 * Process delayed final ACKs that we haven't subsumed into a subsequent call.
399399 */
400- static void rxrpc_process_delayed_final_acks (struct rxrpc_connection * conn )
400+ void rxrpc_process_delayed_final_acks (struct rxrpc_connection * conn , bool force )
401401{
402402 unsigned long j = jiffies , next_j ;
403403 unsigned int channel ;
@@ -416,7 +416,7 @@ static void rxrpc_process_delayed_final_acks(struct rxrpc_connection *conn)
416416 smp_rmb (); /* vs rxrpc_disconnect_client_call */
417417 ack_at = READ_ONCE (chan -> final_ack_at );
418418
419- if (time_before (j , ack_at )) {
419+ if (time_before (j , ack_at ) && ! force ) {
420420 if (time_before (ack_at , next_j )) {
421421 next_j = ack_at ;
422422 set = true;
@@ -450,7 +450,7 @@ static void rxrpc_do_process_connection(struct rxrpc_connection *conn)
450450
451451 /* Process delayed ACKs whose time has come. */
452452 if (conn -> flags & RXRPC_CONN_FINAL_ACK_MASK )
453- rxrpc_process_delayed_final_acks (conn );
453+ rxrpc_process_delayed_final_acks (conn , false );
454454
455455 /* go through the conn-level event packets, releasing the ref on this
456456 * connection that each one has when we've finished with it */
You can’t perform that action at this time.
0 commit comments