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;
}