Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7742200rwn; Wed, 14 Sep 2022 03:55:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR77e9z4TyLTjB02Up4pVY45WQ+CwttKzHNTUVtBpRCpZoDByNxjb44KgJGmVkrpF2fk6H2h X-Received: by 2002:a05:6402:1f06:b0:447:f6a0:2f71 with SMTP id b6-20020a0564021f0600b00447f6a02f71mr29816735edb.243.1663152921271; Wed, 14 Sep 2022 03:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663152921; cv=none; d=google.com; s=arc-20160816; b=a5KRkVrkrfXvTt45dMoQ+5ULaxTpJ676ApjInl670JfQgu7R74ARRcF//7eZVEkyYJ 4mCNsvmWtYjoJItqMi2sknro+Gry70INjYZHzaQenkOxZISE3m/ZKBxL5wKPj2QP4IBr k9OB7XPAT1dUW86pvxz8SvgcigHtdJOX71p9Rw+1NcF9ftY2RbMaMHzk334J2++ffl8u eJSisub6DizPNTS3jvesepbwKgxpgq7L1bH3pDvxVoqgo6OCR5gS3lLLCw9WVr5YzYl6 Pn371s9I+7cgBgTWM7ft5jfj4susIrHQnumBVvB8IlbtET1XkXfv4+3NrvwgbJlIMVZx tjMw== 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=Wc6UqN2rBrRPIKRWEZkd/HK/BLX6Fc+iydsV3In6uJs=; b=Z/QZLUgdqw2etR2MynfgrnDzCNQHA/AbV53J/VljGBlg174vKU5H5BHkKl91yKUdB5 Q3oYdaEbQaOudUTr6Qso/0tInf2Bqj32DHk4vPm2aapoDY1VRnk7k+idbSE3qS0zYhrp 7KBzYU93oY3Ube25Vlvail8YNy3o4IZ6hK/tnC8GyWwhrJRcHb+Z8Ak8UHQNBPg1gMfk fqu4kTVB6Jz4XxeRTIAKCY0Fswn/tvbAoszWbQx7CwIPqoUfQQtMIarQw0I9xsmDtZvU YmOyGtNh+An6ymOTVeU9wyXb20nlmHuS/x2tW7YIEfJ8tiHeFgQuxIEP8xvsJK6+BF4r bgHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=oOrs1LpY; 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 mp11-20020a1709071b0b00b00778857eda1bsi14486593ejc.514.2022.09.14.03.54.55; Wed, 14 Sep 2022 03:55:21 -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=oOrs1LpY; 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 S230006AbiINKvO (ORCPT + 99 others); Wed, 14 Sep 2022 06:51:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbiINKvA (ORCPT ); Wed, 14 Sep 2022 06:51:00 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF75C62A80 for ; Wed, 14 Sep 2022 03:50:54 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id y136so14532873pfb.3 for ; Wed, 14 Sep 2022 03:50: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=Wc6UqN2rBrRPIKRWEZkd/HK/BLX6Fc+iydsV3In6uJs=; b=oOrs1LpYB0NxT5AuspZSwCGv3oFKdg6VgFR8OpUnYS8lvjCNyjNb/6jMklnwW1HBGG jI/xowxQ77fW1KZdkpQYusZAof47Be5v/T65EGudfxhj6viEnmeUtuyU7h3liWHDO8fE lC9lPZZ1gL1c/pG/d08McSFu81TO3OX20KtJu1juI83ho9KOwBhj74EvxOx5tzd9ofwY cwm9FABc2VC+ElY//cOiWMCQBVXGAXyigc9SV5QPWg3+AW7sUeHh9/nTxz5nTq+pU+Vv Wy4EE34SYw/R4YMCJiD56PdZZharxDBstXYdsBEDc4DM84Rl3fDPFYlpa+TODRsI/wun rh3w== 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=Wc6UqN2rBrRPIKRWEZkd/HK/BLX6Fc+iydsV3In6uJs=; b=52bD9L4FhJbIoq3SfU9+jOP/gY+r68j/4sXh5h5SKRixjKpjstjNCffXWOS2SJHqaD xbdHJECPVmdEdJ2Mtrh/EhigIkf99OmfsLYWtszntpVOzYiH4e0399PiNp7nTqBgLhAm r495fRHIk3pvoAmGLpRPim5HYOoqCR99/sRPFfo35CEN9rBD2yowaFs4rmOIMc69Q/b+ phgHz+uBRm8YweUCbLoUmqEiEof0yRf4KoPGM47gbuGfasQJPuo3Z+c0XreVFL/Avew/ 0tqrfx9leH/ty6nm2/REG+/S9uZ9hZmCQo3SvocR1CsdbCTFTaCs3mj6kOwwzeHOG2FR Si7A== X-Gm-Message-State: ACgBeo2cYiIPaZQ1FsmT+/yR1N0gvcILRKXoR9dVhqKNAvdZb3e8bd61 j2r03Rtnb5s3KwFzZeU6HTKIJg== X-Received: by 2002:a65:6048:0:b0:412:73c7:cca9 with SMTP id a8-20020a656048000000b0041273c7cca9mr32293293pgp.257.1663152654247; Wed, 14 Sep 2022 03:50:54 -0700 (PDT) Received: from C02G705SMD6V.bytedance.net ([2400:8800:1f02:83:4000:0:1:2]) by smtp.gmail.com with ESMTPSA id x13-20020a170902ec8d00b0016dc2366722sm10537042plg.77.2022.09.14.03.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 03:50:53 -0700 (PDT) From: Jia Zhu To: linux-erofs@lists.ozlabs.org, xiang@kernel.org, chao@kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, yinxin.x@bytedance.com, jefflexu@linux.alibaba.com, huyue2@coolpad.com, Jia Zhu Subject: [PATCH V3 1/6] erofs: use kill_anon_super() to kill super in fscache mode Date: Wed, 14 Sep 2022 18:50:36 +0800 Message-Id: <20220914105041.42970-2-zhujia.zj@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20220914105041.42970-1-zhujia.zj@bytedance.com> References: <20220914105041.42970-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, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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. Signed-off-by: Jingbo Xu Signed-off-by: Jia Zhu --- 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