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 BD6CBC433FE for ; Mon, 7 Nov 2022 12:38:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232296AbiKGMiB (ORCPT ); Mon, 7 Nov 2022 07:38:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231459AbiKGMh6 (ORCPT ); Mon, 7 Nov 2022 07:37:58 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463B8DFB3; Mon, 7 Nov 2022 04:37:57 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E27061F891; Mon, 7 Nov 2022 12:37:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1667824675; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ed3REcqcinrJmLgLbLfIF+BRE6o6gpBSlWOSlOSmye8=; b=XKvTy4K7d5rJbT0/gAR4YVSgUEGDOS74T0duAaEJrGsfYjdEcVjw0q0jLhzwGQteL79+Nr 0ErsIv89i0DE17A5pNCBURW/+IJFnpI5NPbUpCNUrYgU41Ak8RFp6I2Iq9F6b9kG5q5CD/ mocLb4rUtf9Ex/5+1NXRPB1TFgwtGHQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1667824675; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ed3REcqcinrJmLgLbLfIF+BRE6o6gpBSlWOSlOSmye8=; b=HuOPH3TBs36mze9bR2eYP3JR+gdguQ0bIFLHONbWf+z5B1/Pa0+tELmGWvUfwHGnlipVhH wJhJtGWJcSbm1IDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D280F13AC7; Mon, 7 Nov 2022 12:37:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ILMkMyP8aGPYPAAAMHmgww (envelope-from ); Mon, 07 Nov 2022 12:37:55 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 688B0A0704; Mon, 7 Nov 2022 13:37:55 +0100 (CET) Date: Mon, 7 Nov 2022 13:37:55 +0100 From: Jan Kara To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Theodore Tso , Jan Kara , linux-ext4@vger.kernel.org Subject: Re: [RFC][PATCH v3 30/33] timers: jbd2: Use timer_shutdown() before freeing timer Message-ID: <20221107123755.vrailpdu5wxrb7se@quack3> References: <20221104054053.431922658@goodmis.org> <20221104054917.365008421@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221104054917.365008421@goodmis.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 04-11-22 01:41:23, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Before a timer is freed, timer_shutdown() must be called. Note that it is > assumed that the timer is not running while being freed, so only > timer_shutdown() is used, and not timer_shutdown_sync(). > > Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ > > Cc: "Theodore Ts'o" > Cc: Jan Kara > Cc: linux-ext4@vger.kernel.org > Signed-off-by: Steven Rostedt (Google) Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/jbd2/journal.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c > index 2696f43e7239..57d2445d8c8b 100644 > --- a/fs/jbd2/journal.c > +++ b/fs/jbd2/journal.c > @@ -2157,6 +2157,8 @@ int jbd2_journal_destroy(journal_t *journal) > J_ASSERT(journal->j_checkpoint_transactions == NULL); > spin_unlock(&journal->j_list_lock); > > + timer_shutdown(&journal->j_commit_timer); > + > /* > * OK, all checkpoint transactions have been checked, now check the > * write out io error flag and abort the journal if some buffer failed > -- > 2.35.1 -- Jan Kara SUSE Labs, CR