Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp743303rwn; Thu, 15 Sep 2022 06:01:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR5w1OuUgUrjeeDbNBN2s2lb8iwloBgBUrT22Mj4UXCVbZUDT+EaNnL51D6XlUtcEXCHYDxa X-Received: by 2002:a05:6402:350a:b0:452:8c84:8b with SMTP id b10-20020a056402350a00b004528c84008bmr9250453edd.93.1663246884315; Thu, 15 Sep 2022 06:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663246884; cv=none; d=google.com; s=arc-20160816; b=o+6tlgN/Q0oLE8SZCQUPRlwuOUJNzYJDybtHYmIXEJLx2KgryLaNKm99JRsl7F3T4m G8bm0452L5vYAiUG+dBM1C27oW+GHGkJdSMWzwlfevEEUxdqtR5ROjXz/cQ06Puq6DR2 bEhbwiVBG/LheD6aK0VlkTAjdHTkK0JmsiG+Ofh+0EHlTQna3TCs0oy8U3yJ7xq0mXVw Z0BH0Kohc/aYSSY7ppeE24XEuRYzL6OsC8ev2qps6yseqm6mVvy4tyhRCVqla1eWYfGC 8utPQ0YyVBNkcV233YeCjl+ST1LP9PwSXgC9MiPoEiV53fYBkGKA8PC7ojWbcUw8gTD5 tCxg== 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=Qyyly0y8hqdRh/t9nYiYaAraDfG9P+e3ebneuWywx+A=; b=oyIpZJrfwuYCrnfHK8deE2KFl7yyTM0bks0g6MInPqdBcJyi5vERPoZKO/e3GIOedW QSg+Iq109eXt5j17mUvPWoO9hAjesLsK90sXgInKjRKUmG6nphj9COU5qfZgzGRiS3zM 8NoAL8CfLW4CSQrsuZG7RiHHKB58DIvhhl2K8IWkl7hu5wmen703CXbJNlma9kWaqcQ1 jirYyprzz8K6boOMKIQy6gEh5NRA4YBGGSawfPIOJpaEXm4IEqCqOMrI6i38uxKMbRJd mAktbI0mUy7cQmdMNTKlePlt6RtejHC4y8joWsctA0z6ePnw/br1/ExmISesek/2Mcgy MJTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=et8SUZfo; 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 nc4-20020a1709071c0400b007799cb3317csi15266492ejc.280.2022.09.15.06.00.52; Thu, 15 Sep 2022 06:01:24 -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=et8SUZfo; 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 S230046AbiIOMmn (ORCPT + 99 others); Thu, 15 Sep 2022 08:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbiIOMmd (ORCPT ); Thu, 15 Sep 2022 08:42:33 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463B7617C for ; Thu, 15 Sep 2022 05:42:33 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id v1so18221878plo.9 for ; Thu, 15 Sep 2022 05:42:33 -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=Qyyly0y8hqdRh/t9nYiYaAraDfG9P+e3ebneuWywx+A=; b=et8SUZfoNeMLnBl0MYEBpYeDFeu37dGfFrRRjQ3AaSxd8mtSowHWfpGGv23g3PclEl rgBoVJGjypKu0gzrIGPI32O/YAaVP3IBo2CqI3GwpG50VYJCT/VLn/PefDTSP4ScGOeV 8gw76ga6vh3F0wTgV/EJQOyXCnDggxUUWVUSahI18DNxw3/pIw+4CYWKjOJdgx/RcVFw njw6xSqeSSHJlZIjWtf+8vvHJiTjTyOwuj4vJOpIU8M+1LOlig0Mc60vsGYkEYADlGgJ BIzUJSej46PeT0PMCaFJFwlU4nASJaiHY5B42BznFYhPOAqMqaQK1C5O2MQk/8bS78i6 RbTA== 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=Qyyly0y8hqdRh/t9nYiYaAraDfG9P+e3ebneuWywx+A=; b=ad2TtnxHJNrh1kBgBNpDMQC+E/1iFmA4dK6yIrYeAeTSqqwmfZu1sz+ZZ7+2V107He 72igf5syuGpWPcunwqe72gaDJizxv0QBiMgesaiEhdrM8pqnp99ZHJkxt9/IOnXVYhas cw02IUjeOmP1hqdbUPrI9IAlXHwmQoqD4rOm15wzrXQ12yJYE/F4w9wjlNASnl4hKoGp /+l+7Oefdbnu+Kz60zO4VzwFkhUxrLO/l6eDFIKVkDJyaOfmY6CtiuSavmVCX4+v59sA PP7P+v+y249VZz10b3ygo/hD9JhGthVy1ZnBZ9tcgcHGAABHJHlqZw8J9VAs1hnCIgto 2RdQ== X-Gm-Message-State: ACrzQf1SpkraHIR/0FB0qE8G+YYmgesAvHgAERfqEOaO5J5+pFaN1MkR BPDgnbnYzIZGKSivHIT60LkDgg== X-Received: by 2002:a17:90a:db8b:b0:203:1de7:eaaf with SMTP id h11-20020a17090adb8b00b002031de7eaafmr8232679pjv.168.1663245752797; Thu, 15 Sep 2022 05:42:32 -0700 (PDT) Received: from C02G705SMD6V.bytedance.net ([61.120.150.76]) by smtp.gmail.com with ESMTPSA id p8-20020a170902780800b001637529493esm12721906pll.66.2022.09.15.05.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Sep 2022 05:42:32 -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 V4 1/6] erofs: use kill_anon_super() to kill super in fscache mode Date: Thu, 15 Sep 2022 20:42:08 +0800 Message-Id: <20220915124213.25767-2-zhujia.zj@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20220915124213.25767-1-zhujia.zj@bytedance.com> References: <20220915124213.25767-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. 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