From patchwork Fri Oct 28 09:30:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 12180 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp721102wru; Fri, 28 Oct 2022 02:33:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54RBwC8524T0e8oypoXc1n9ssCDFgmMUqnmErcmUzl+LSJsu+M9cjMzONSREhzCpbBf6zi X-Received: by 2002:a17:906:db02:b0:780:24e:cf9 with SMTP id xj2-20020a170906db0200b00780024e0cf9mr46388507ejb.460.1666949595190; Fri, 28 Oct 2022 02:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666949595; cv=none; d=google.com; s=arc-20160816; b=cFHHcYnwNrUrQKfS8jLMcD6Q/O9RLtXx+QPTpn+WBGBqf6wEJoErNXHGdP/CoisTkd cymgTD/h3OpDzM5F2xVOvOCedZfVLKHV1M/7vRfu9YlD/RskbEckXxE+/HqZcMW+TP8m CdcTdty+EetlUQ8a9mYT6gdSRHjjxynxseApMIPS8TGBAM2+8xvsQE6EZsTKZt2wjCqY BJadSD6iA4nmm0E43N8aNBV//81qrXYOhVvIvH2kiLxaHtM434BVJTlr6PejAUddqelT tAynZ1RaUDOOaRmzEvYSGHGSCV0H4TA6I471jkfSMXcXG91/saeWasHmXsrTYYIy7NBB QNqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3wNmOELDnsuy/CqEXpMehn0+OdrVLoOIrF847WQkCFk=; b=vgUVuxUXKWx8DlxwtpyWNPrl3FbDAlD2MMI68I1uHTXL0tm0LuaxnvCAzxdr5jK5MF 8M+PSF7wd7vn+3nG/JCk74gkyiz89iMH1lZUc4B4e7udhNkEBe9BkDJAGKdfNtEuc/TX cxuZYlyz/gqreKBR+qde9KNgZ3WMlwOcChSAntbg775Xt65OfAFBVoDteUKzG/rReXSF KHepHZSPSwKGOVMsG5FDnU+V9yNMDoGx1H8K9Q5/xeNTCAw4YaRce3r7h/5vwUndBwyW THfI53U3Be7o7idN7iEKJy6aE97Pu0YRNgE4SXIbIsoZxm7VTljpOENcc6b2z0mL8MhD 3gUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oEm3wHfR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a170906150300b0078d930212c0si3188502ejd.347.2022.10.28.02.32.49; Fri, 28 Oct 2022 02:33:15 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oEm3wHfR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230194AbiJ1Jbq (ORCPT + 99 others); Fri, 28 Oct 2022 05:31:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230142AbiJ1Jbl (ORCPT ); Fri, 28 Oct 2022 05:31:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 091FA1C6BFD for ; Fri, 28 Oct 2022 02:31:41 -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 9BAF06271D for ; Fri, 28 Oct 2022 09:31:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1059C433D6; Fri, 28 Oct 2022 09:31:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666949500; bh=on4ve1L/tc15LIA9yjdcewdPR3skPWPiVhzzpmc0SE8=; h=From:To:Cc:Subject:Date:From; b=oEm3wHfRMe+buCKOwTMPwYYVDTpBMqxXzCWLXqLSe/P2ZQe7+yQT1FiL4w2C+sx8M JvCPtXdaaMuOsVLRneYmHdX1EqpkO+mGUR2NXe+/qRZbg2SIiT/6XID3dHaPkhHKdh DaCmLXC4zANKsgldhSgjhKtTF541MRB7XI6o41+WXBzInXQJAK8vJ3z1iqgI4EqhTA u9RvR5mVUHZm/xrjUlOtf/IQlhx8YzL7yG3BWCrbbiWmhipp7zQr8lYMeOwU8aJsFh p6BsMSBPrke9gRa9TtElcAXznmHvLbq8jdTnC+j8LWbKvUNa7RRuvoHQIeIuoGvLO2 Cw1yuykhilKsA== From: Chao Yu To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu Subject: [PATCH] f2fs: fix to destroy sbi->post_read_wq in error path of f2fs_fill_super() Date: Fri, 28 Oct 2022 17:30:26 +0800 Message-Id: <20221028093026.1406495-1-chao@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?1747923338888550258?= X-GMAIL-MSGID: =?utf-8?q?1747923338888550258?= In error path of f2fs_fill_super(), this patch fixes to call f2fs_destroy_post_read_wq() once if we fail in f2fs_start_ckpt_thread(). Fixes: 261eeb9c1585 ("f2fs: introduce checkpoint_merge mount option") Signed-off-by: Chao Yu --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 3834ead04620..696f094c4505 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4523,9 +4523,9 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) f2fs_destroy_node_manager(sbi); free_sm: f2fs_destroy_segment_manager(sbi); - f2fs_destroy_post_read_wq(sbi); stop_ckpt_thread: f2fs_stop_ckpt_thread(sbi); + f2fs_destroy_post_read_wq(sbi); free_devices: destroy_device_list(sbi); kvfree(sbi->ckpt);