From patchwork Sat Oct 22 07:21:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7260 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1091691wrr; Sat, 22 Oct 2022 00:51:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7C9T3xl6bbYoWWL/if3w/4eaQ5qQjQ00cUeN/6gUBHlHLfMjQhr3/ouXL/O8ZTMh1xcAVK X-Received: by 2002:a17:90a:8b93:b0:20a:bd84:5182 with SMTP id z19-20020a17090a8b9300b0020abd845182mr64407234pjn.161.1666425093189; Sat, 22 Oct 2022 00:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425093; cv=none; d=google.com; s=arc-20160816; b=M88hJMgjF1WGnR0dJVlpCQx3FuvyBKrfwJCQSLOP5zTRbTM9kowgQCewYXQz7POSIT HtAnHcWE+W0IqfLIIE05RVEgmt/W6s+rRbMM9kEYdGOKCKtQkPQtOFxlGgg9aoH94Hpr SazgisaQj1UYHtOYV/WIjwISC0s3q/tbZzA6na6ejgSGbm2XD7TvD0QG1CJZYirDdvtC YV+qsu8uIvpQU/NTps7xjP42gY8wNgbgpbC2pA2Tgn7uV/low8LN9LanVJQrM3ZxwOAw hl7eqCuOD3XvR+y55MqHJIrsj2etoawyF773h6vOEaBl6Tdp+dgmXgyl7WF6CIylf2dZ pQtw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hkeF6aBcUll/RsHjBBYfXEHPU7uKetDCoY1j1Y+bmjE=; b=0HIxyFoaH3oC//jAnbkjJd/i7W8vUBUlTDKMI9FSSuGHK0aswhE9Qp1SEyy0QC0Lsl mPh97wdVgiCGh56CN7PRRSKP3MKfn4kWGvR1GeebHbnRvMqOIH8isixNJvwGDka9MgwT wywAsZVNH6OHDqEz97DRFpiAKd+RoWqrtrI8wBTDN1lSt+XNvUiwn44pSwkd3OE6JKM0 JeAXpRR0lJms5cF6kwLUFXkioAaMJM0hYZJiW35NVVZppGqwxbJsnK7Oau3t6/n4A1pS 0ZdNrg3krj59nn0gZ/Gnm1p4Jm3U/yiUvSr01b+iXxwNW2iVXq9clLdF5qK/EZLESdE4 zpyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O4KpzxkA; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b0046ec3bd90bbsi3259476pgq.60.2022.10.22.00.51.20; Sat, 22 Oct 2022 00:51:33 -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=@linuxfoundation.org header.s=korg header.b=O4KpzxkA; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231776AbiJVHvC (ORCPT + 99 others); Sat, 22 Oct 2022 03:51:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231773AbiJVHtH (ORCPT ); Sat, 22 Oct 2022 03:49:07 -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 2EAF7290681; Sat, 22 Oct 2022 00:45:51 -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 5817F60B99; Sat, 22 Oct 2022 07:42:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4258FC433D6; Sat, 22 Oct 2022 07:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424546; bh=xPZNmdfZfy6R68roT3NgTCf59wMzLPobvchBQEYHcy8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O4KpzxkAJgBc/qo4eQ/zFD8cOVibSOLISg/0ZfTSiTvg9nth4t8iVfAT4h8fqcPsp ie+9ld2w49CLgu8hBslwG8B/U52i7Rq4YFCCgWdNPZbC9X1DzoZiU6EBuKGBwam0TG boLT8PpQQ0LKV2jiGUOrk51SdDK+COaOW3chqRZs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jingbo Xu , Jia Zhu , Gao Xiang , Sasha Levin Subject: [PATCH 5.19 186/717] erofs: use kill_anon_super() to kill super in fscache mode Date: Sat, 22 Oct 2022 09:21:05 +0200 Message-Id: <20221022072448.584226841@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747373358696772551?= X-GMAIL-MSGID: =?utf-8?q?1747373358696772551?= From: Jia Zhu [ Upstream commit 1015c1016c231b26d4e2c9b3da65b6c043eb97a3 ] Use kill_anon_super() instead of generic_shutdown_super() since the mount() in erofs fscache mode uses get_tree_nodev() and associated anon bdev needs to be freed. Fixes: 9c0cc9c729657 ("erofs: add 'fsid' mount option") Suggested-by: Jingbo Xu Signed-off-by: Jia Zhu Reviewed-by: Jingbo Xu Link: https://lore.kernel.org/r/20220918043456.147-2-zhujia.zj@bytedance.com Signed-off-by: Gao Xiang Signed-off-by: Sasha Levin --- fs/erofs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 95addc5c9d34..ddf8f737cfb5 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -877,7 +877,7 @@ static void erofs_kill_sb(struct super_block *sb) WARN_ON(sb->s_magic != EROFS_SUPER_MAGIC); if (erofs_is_fscache_mode(sb)) - generic_shutdown_super(sb); + kill_anon_super(sb); else kill_block_super(sb);