Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1886951rwn; Fri, 16 Sep 2022 02:18:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ZDmVo9QadeR2jy09vzTvSqwmUOQpN77UEI9BEtOybs4eHmfgU9gJDtMqE9McRLR8EYxhE X-Received: by 2002:a05:6402:2b8f:b0:453:2e59:364d with SMTP id fj15-20020a0564022b8f00b004532e59364dmr3207644edb.254.1663319911976; Fri, 16 Sep 2022 02:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663319911; cv=none; d=google.com; s=arc-20160816; b=inPnoD50LeZI8r8XefXIj+mD3sXduXxM1+NOlngsXLLbNuPeEvzxd0QvspOTgJiOl+ u5Hhb5WgiG0R5vfzWCIygw6sly3Xlbzze4OzSFw6j0XuQkbw01Ldq7J9jr/roeQ2maXV 3L0c6hiUHBeV871s9j7TzGz0ifT8W7fgDZETGyHqQDc9hIx7ehiSxS1aDPOO6MYxqreH PcUsiedWpaYlxzO2ACUTIxdy3NWjMgd9czvvQKkXAUbWfzTRGz7K1i0tM2f3ADjd5bKI pAHSZ2PiXm/44aP7zEehoShEIKodFHo/R6w4xmNBQSJDvxcZ+R/YMNrmNrN4lSC/pk9k X+Zg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vnrn5Lz0Sq4BDA+kMPiBQA0vIKB2GCJKPoPvtdJGVII=; b=PLEgGLeAvj18FK+TvXFH2JTcYF2Wv0T5B8+ZklfrqlaXr/8HgZleW8bRsrqqae7YIz C+Z+O8o6kQxwiTgyF3POK3Omvv4Uu2NuvopPxjrgoSEpilHyhIg81a253bG3BrvDNgWx HKHUeJ4bcuJEsUdX3FDuD5VeqeCoaMVvFIYlm8JIJPdw54daRViMHUlWlQOoZXEkpOzF aWY3EH8fj38RVlpzDd0mEzSGvmm82ZQaZsv9sFQFI76YnFv+cNr0Bjr3KmpK6xurXTx6 KHx6ywLMm1U3kP2Sx9E6QaAu44TarLXSTh/GPklHKpnDTD5Lo5aZwN4TdCE2aVkmhrqH Wtaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=vFU4rf8G; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6-20020aa7d706000000b0043cc3506c6esi1729545edq.217.2022.09.16.02.18.07; Fri, 16 Sep 2022 02:18:31 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=vFU4rf8G; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbiIPJAA (ORCPT + 99 others); Fri, 16 Sep 2022 05:00:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230449AbiIPI75 (ORCPT ); Fri, 16 Sep 2022 04:59:57 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0031D13F99 for ; Fri, 16 Sep 2022 01:59:54 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id go6so16229020pjb.2 for ; Fri, 16 Sep 2022 01:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=vnrn5Lz0Sq4BDA+kMPiBQA0vIKB2GCJKPoPvtdJGVII=; b=vFU4rf8Go70F6Q5X1St4eoonyTDWg0bIGM7mlqkuUZSogR+IJq4axzKODFz8sKnu+n YXiBN0DBk244rf8gX4Pe+VpbkyIgpV5XBYq6grMrBPmXNl7XOL6g42xvhAltH35m8y3B PEze6Qe5vtcJiwsiQ6i0Fwkbc5xrFbMhe51gR3C/M9DiX5e28ek/y5voCR2eiqRCT7Ce iy4NsthMJdE38uXD0cSiy17Z+pQWTjcYUK90Wo/KID82AjnQt6nJOgtVLo20QXsl8H8B 006JBPs9LcPf9RPdCnxagYlGfECHalGz3iZumnvCzQIeX4R3JXpezCdP6mPqHmSmPLV8 9F9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=vnrn5Lz0Sq4BDA+kMPiBQA0vIKB2GCJKPoPvtdJGVII=; b=4yUOVCazYSyYApR8w/yBYwYcr1lDyvaEzBHSSzeoTr6QSKK0uUD6GLu6lfzPh8sfXq AJiywZaVWoVH3BxU9860/LMewxwo/vuGaWClaJQ4dIgoudm8U/mVO9smdAyaQVVLFL3X yyJBWyC6N4SOcKHWt9qkgDjKHWQsVyA2Fbh4k7aaahK7Y0QrNRyQcnz46gnXuFFzu8mp aMfmudi3qX7RiVHBtWNsvs3OxhQjHn8k16QoZVwdugg+lryl0izpLZD2wVnlBGdAlS5w wXgs7iujouzC8LeJZL0LpQQz+nJuOkVXgy2dgpQ+yUHQiN9gNxASq6shmkWa8VeZb3s8 4paQ== X-Gm-Message-State: ACrzQf2XSdrCNECnYTwI6q1cA1UjB1Nwud8bMunRfZhQMsDN+N7KeQiQ tkTFK7lqAzj/P0Uxk+vKxW+bEUrJU0tR/g== X-Received: by 2002:a17:902:d70e:b0:178:2d9d:ba7b with SMTP id w14-20020a170902d70e00b001782d9dba7bmr3776799ply.90.1663318794120; Fri, 16 Sep 2022 01:59:54 -0700 (PDT) Received: from C02G705SMD6V.bytedance.net ([61.120.150.76]) by smtp.gmail.com with ESMTPSA id u11-20020a17090a450b00b001fd7fe7d369sm970578pjg.54.2022.09.16.01.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 01:59:53 -0700 (PDT) From: Jia Zhu To: linux-erofs@lists.ozlabs.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, yinxin.x@bytedance.com, jefflexu@linux.alibaba.com, Jia Zhu Subject: [PATCH V5 1/6] erofs: use kill_anon_super() to kill super in fscache mode Date: Fri, 16 Sep 2022 16:59:35 +0800 Message-Id: <20220916085940.89392-2-zhujia.zj@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20220916085940.89392-1-zhujia.zj@bytedance.com> References: <20220916085940.89392-1-zhujia.zj@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 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 --- 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 3173debeaa5a..9716d355a63e 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -879,7 +879,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); -- 2.20.1