From patchwork Fri Nov 4 05:41:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15353 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp190839wru; Thu, 3 Nov 2022 22:51:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5fSNAOv+zzcVH6/ZToAcN8CfgP/vKOG3ZrZCbBhtZjUaa63KHTRsR48upV7HltouhUdCPE X-Received: by 2002:a17:906:6791:b0:78d:4051:969f with SMTP id q17-20020a170906679100b0078d4051969fmr32457465ejp.171.1667541074673; Thu, 03 Nov 2022 22:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541074; cv=none; d=google.com; s=arc-20160816; b=cba7LeFnkBUK+VKXvyKylmhN1VEOUqzBWKD+QBKdvQX5xfj4szfPqvrsxSOvvxHBeE L4ZjY85OKKm16/A9Ddx0RADtrrOsRypGTuhYem4iY1HTij59Qeygkf4PvnW4v9QEcgKx ldLs3+/Im7UhMceqzqilLR1Y+0AmL6z8hA2bucX7zJu7OSPYjMS9Bnp9YZTj9wyvkdLK QFwVeiwbA+T2sVy2jIFAmivpRtujDRqy+bQky70v4GOZyDigDAF/6PTTbnfOIrRlll7J cTFAX6GkdfqUmsgLpEHuUFUX+umFZRcY6DfZjNbwXVioMyDhjHMPKRTRaEhG40+atWuh HELA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=6PTkFrLPn25Y/ND4P30iiREKaRJ9nsHGBiQ3fp/T+lk=; b=E5FKnJL/4X6WZ1VJrbXMCYQYM+qXLEpZiu0ncnYGf7fFxKxAACeXDt0u5G0Mb9vdRp AO50nIbmkIl4TcMFjCd7FKrwBLH1/7HhmUeVqrqzgjdnLnphitqapEG3UT0draOxfEwk 1+073VxvZx6Ihc8Bixqtf0uWeY2YHg/kGtD/M1SwYUSjqzSAnPUSA2/UBmUSlW0tLpRI pKlinNSTDSrJJWZcQ8a0PQu4BANo+egHEZSuRWxdIPkPNMWkfyexPOts0WfcVgmidhzl TlCDmzTtzr4cQ1ORptHY2k1CJYxQA6PLdm92BVBHPBFylu61dkruVxmMzSIR5HilZkI/ nSUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q18-20020a056402041200b0045c9313faf7si3159069edv.353.2022.11.03.22.50.51; Thu, 03 Nov 2022 22:51:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231700AbiKDFuG (ORCPT + 99 others); Fri, 4 Nov 2022 01:50:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231382AbiKDFsy (ORCPT ); Fri, 4 Nov 2022 01:48:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EE8B28E1E; Thu, 3 Nov 2022 22:48:53 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 7F982620B2; Fri, 4 Nov 2022 05:48:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0D85C4347C; Fri, 4 Nov 2022 05:48:50 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oqpZt-0071Ei-1h; Fri, 04 Nov 2022 01:49:17 -0400 Message-ID: <20221104054917.365008421@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:23 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , "Theodore Tso" , Jan Kara , linux-ext4@vger.kernel.org Subject: [RFC][PATCH v3 30/33] timers: jbd2: Use timer_shutdown() before freeing timer References: <20221104054053.431922658@goodmis.org> MIME-Version: 1.0 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748543550049164716?= X-GMAIL-MSGID: =?utf-8?q?1748543550049164716?= 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) Reviewed-by: Jan Kara --- 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