From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E76C5C4332F for ; Mon, 21 Nov 2022 20:08:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231821AbiKUUIr (ORCPT ); Mon, 21 Nov 2022 15:08:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231843AbiKUUIo (ORCPT ); Mon, 21 Nov 2022 15:08:44 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AF07C72D1; Mon, 21 Nov 2022 12:08:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1195BB80FB3; Mon, 21 Nov 2022 20:08:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A16BFC433C1; Mon, 21 Nov 2022 20:08:35 +0000 (UTC) Date: Mon, 21 Nov 2022 15:08:33 -0500 From: Steven Rostedt To: Thomas Gleixner Cc: LKML , Linus Torvalds , Anna-Maria Behnsen , Peter Zijlstra , Stephen Boyd , Guenter Roeck , Andrew Morton , Julia Lawall , Arnd Bergmann , Viresh Kumar , Marc Zyngier , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Subject: Re: [patch 04/15] timers: Get rid of del_singleshot_timer_sync() Message-ID: <20221121150833.61ab3b01@gandalf.local.home> In-Reply-To: <20221115202117.212339280@linutronix.de> References: <20221115195802.415956561@linutronix.de> <20221115202117.212339280@linutronix.de> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 15 Nov 2022 21:28:39 +0100 (CET) Thomas Gleixner 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 > > --- 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/ 0f9dc2b16884b ("RPC: Clean up socket autodisconnect") 55c888d6d09a0 ("timers fixes/improvements") Reviewed-by: Steven Rostedt (Google) -- Steve > return 0; > } >