Re: [patch 04/15] timers: Get rid of del_singleshot_timer_sync()

From
Steven Rostedt <rostedt@goodmis.org>
Date
2022-11-21 20:08:50
Also in
linux-bluetooth, lkml
Reply to
Thomas Gleixner, 2022-11-15
On Tue, 15 Nov 2022 21:28:39 +0100 (CET)
Thomas Gleixner [off-list ref] wrote:
del_singleshot_timer_sync() used to be an optimization for deleting timers
which are not rearmed from the timer callback function.

This optimization turned out to be broken and got mapped to
del_timer_sync() about 17 years ago.

Get rid of the undocumented indirection and use del_timer_sync() directly.

No functional change.

Signed-off-by: Thomas Gleixner <redacted>
quoted hunk ↗ jump to hunk
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1164,7 +1164,7 @@ xprt_request_enqueue_receive(struct rpc_
 	spin_unlock(&xprt->queue_lock);
 
 	/* Turn off autodisconnect */
-	del_singleshot_timer_sync(&xprt->timer);
+	del_timer_sync(&xprt->timer);
And this was not even a single shot timer. It used the
del_singleshot_timer_sync() function because of incorrect assumptions.

Link: https://lore.kernel.org/all/20221105060155.047357452@goodmis.org/ (local)

  0f9dc2b16884b ("RPC: Clean up socket autodisconnect")
  55c888d6d09a0 ("timers fixes/improvements")

Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve

 	return 0;
 }
 
  
Thread (36 messages) 36 messages, 5 authors, last reply 2022-11-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help