Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1015556rwb; Sat, 17 Sep 2022 21:48:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7pYSxnU4BiIUQQHNMGMUluMmiEBxp+2PATArZ2DLoJppPKEJ9aoegDraYqSAU69IcBFr9Q X-Received: by 2002:a05:6402:2802:b0:43a:9098:55a0 with SMTP id h2-20020a056402280200b0043a909855a0mr10130030ede.179.1663476538161; Sat, 17 Sep 2022 21:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663476538; cv=none; d=google.com; s=arc-20160816; b=A428uNAKduGwohJPBPcJEwW7shyQWqEMAinu0beZnS1CCDZ/5LcrU33zLPg5K0SbSz +wjROP7+FV8RyiRVLbWcp3bJamBA7t+W32oEhkDhONncCVoGeTDMGeIkek1G3PLB1FHS SWZm9Y+vA0QwHkeKGdTijJAOA4GC0z/U3DqEw8XneoMTbmIyVJsoggXrGIS3BMKp86hr 2/uJvU37oRrAOe88gyY4XF2wGM5qyVTnTdfzDpTn7GcRo+gY3bDWgwYJJqmHBKuTD+qN mulETpTfeP2Pm9+GLfk/9tBbUb6hg61Oo5/FljzIc/rn8YEXFIouaYh4vkycTezOzbqJ lE4Q== 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=WhabwQqyG9bzWh8wMUjiTCQWURcNIdgMBtvG0c69EhpF+6WoPNVN4EumS5pPBiwRgN xmatZ614w589VvHPrqtr9Il0lIE1/D+cUgBAPg+EotyPvWdHtjYAf3tQKQ9xg4aQuw4W luacDO6qEzfmbxVyniw5gGMeWU/cizcuXo9aJN+c4rhg06t+8ovrX1oakeGtstM3iyim 8SkLKP5wGTcWR0NzbmzLxQCBAsmqDUKa2YES/KDJ4C2POG+nOnwN4h9yWjbY3m8Wim7s 6Q9n7ko8OrHFVlA9TmIfuY8diKnHNPcN3GPArCIDzZf+DtjJWpRDS387frR+XOZ9gj/D 8eJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=eVaRVfx5; 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 e12-20020a170906314c00b007806acadb4bsi1135206eje.635.2022.09.17.21.48.32; Sat, 17 Sep 2022 21:48:58 -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=eVaRVfx5; 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 S229618AbiIREfN (ORCPT + 99 others); Sun, 18 Sep 2022 00:35:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbiIREfI (ORCPT ); Sun, 18 Sep 2022 00:35:08 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89DA613D5E for ; Sat, 17 Sep 2022 21:35:06 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id h188so23914879pgc.12 for ; Sat, 17 Sep 2022 21:35:06 -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=eVaRVfx5a2MVEdsHGLTKj56DVEcrAKgua7VGnhGuCRo54sfJnqUIYr+XO+BbkdT1Zb 91p7t3DNLn1Y10DnRA1xNP7ubPYrptiSSv2pIPQF69SV6FIJgoaI8Edoz6Ve2lI6NGO9 I/3cXdD8eXFSUYB1836GY6jTk7pDfHZzDePuSyAF07ooCWihJS40cNU+8pY9OP1loa05 4xK1oEcStoUp7wLXga4FUZZoX4zPkuGym5UVGGI/0YGuwaLJXhOP1nwB7FvQdY5GFOCW FdfyQ+JLR2Aj5TNnYdI3QtZcfxS/5ZRWv0lkwl/b1ZQKnvdGNU6XsZZ6dVIkwEPRJdUj +Fdg== 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=yqimG6TnFhhhg9r/31A7fOlSxpGWhNWXwmEvzjkN6MJO6oOp7l+a5TQ+NRc1fBiOqf j1VgCER6NTZvMimSXVZX8VfK16+8QLJasurOAwaiU5ISh1S2u94JQJsETOlbnAy78fW/ jCePGS1FewT5mZLslFs27L5Fvnh526Kc807KRILyvWVBlukPZ8e9Z+DuoBU2JGBpAxk+ 1BqoMSidUM/bdc68LO8991P2ywGsLBBsvjxApAbvfsLU864O76wqoFLO1jEFsK2OjLqq lna1cbTNCrZER3bAxw+r6ND8KaCglhFUji6Wfeq93rvGCPZKwwAsoDIKzyOlxuYSNDBU m3wA== X-Gm-Message-State: ACrzQf1o/4zDYgER8+2feFr15oqvAM29V5zBcNxhycStjw+fmugDmBH4 l0KErFjWnav4IMzWOOzeaZTPzQ== X-Received: by 2002:a63:42c7:0:b0:438:e0dc:cc09 with SMTP id p190-20020a6342c7000000b00438e0dccc09mr10797694pga.128.1663475706078; Sat, 17 Sep 2022 21:35:06 -0700 (PDT) Received: from localhost.localdomain ([111.201.134.95]) by smtp.gmail.com with ESMTPSA id l63-20020a622542000000b0054b5239f7fesm3955248pfl.210.2022.09.17.21.35.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Sep 2022 21:35:05 -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 V6 1/6] erofs: use kill_anon_super() to kill super in fscache mode Date: Sun, 18 Sep 2022 12:34:51 +0800 Message-Id: <20220918043456.147-2-zhujia.zj@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20220918043456.147-1-zhujia.zj@bytedance.com> References: <20220918043456.147-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=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. 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