Received: by 2002:a05:7412:1492:b0:e2:908c:2ebd with SMTP id s18csp741037rdh; Tue, 22 Aug 2023 09:17:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECMKqykZv21yAifmh8X+2xRPi1mk4sryT2PfcHUaiikIjF+8duiozqNxJusL0wkOcrgX94 X-Received: by 2002:a05:6a20:1b26:b0:140:d536:d435 with SMTP id ch38-20020a056a201b2600b00140d536d435mr10154168pzb.38.1692721060930; Tue, 22 Aug 2023 09:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692721060; cv=none; d=google.com; s=arc-20160816; b=SQChnGapeRCui2EAhroA7ypGnqSv8HLI+KHrSCSe81XJYFrC+WUq7p7SXbtePXArmi 5BEuABBWi6pe5o5D8z43VzzQhRGnm9naXYJdpLqWB/OoTr0qao/B5OlALaK1+OFioZL8 9wa5OVtzGvigjpF8l3p/5gGE1ON5+iDV2PREN4+vH6X9eKhWnVrC8v39ey/5ynQny7w4 PmVi0aTrn7A9RpUmLBSEGEKSOQigDX13Otyw2Maj16+uHJ7ryiMq/kJWugrFS2u/46nJ yhUBw932Wk/bIEwHwpHQG7pqbzo73y5I/OJ049DLB0ykZlch+4vM68WXUFKaT12uuN1r HvIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=5w9W//7XoI0CZKzmlNq03vhEkABnetO3EFKAtvdBSN8=; fh=VAZD+z5BjsjXRtKpDREjB0C/dpZF4mMR55RD+wSYYq4=; b=pz7aF7bdUZJ4M1xW0G9ofmoRkIS/mvPDKwYFfO8DJ0xiNxp0pCUY/tZlDcL4EeiP4+ uut7QW3SwUxQrNDWd89mOz7+KoZOfJj0GCl7CmyZuaL024wDvFL4xe212h0gvdMROb3U TYKm3p5caKCoBOXW/h38eeynsg/Oy8cgf2EN3PSB4OOxYIbKfyLLzEO9N/KcM7oRo1m9 vGltGAYrCBqjqtyRD7L3mvkbX1fnoK9QfJ2LKmW3pZ70G+XWjZAnXgQw7VBrCZR1CyNH yWUPqHP8qOPyKa4igsLQDM58euQAPlZjr23T+M4Jy5FyOHczekySN51OJhdswZVFx2o9 iu5A== ARC-Authentication-Results: i=1; mx.google.com; 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=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a192-20020a6390c9000000b005652bd3d3absi9687538pge.43.2023.08.22.09.17.28; Tue, 22 Aug 2023 09:17:40 -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; 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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235654AbjHVMRZ (ORCPT + 99 others); Tue, 22 Aug 2023 08:17:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235656AbjHVMRY (ORCPT ); Tue, 22 Aug 2023 08:17:24 -0400 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84AB3CE8 for ; Tue, 22 Aug 2023 05:17:16 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VqMVnFR_1692706630; Received: from 192.168.3.2(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VqMVnFR_1692706630) by smtp.aliyun-inc.com; Tue, 22 Aug 2023 20:17:12 +0800 Message-ID: <539d44d0-2a00-767e-9889-b2f5bf410190@linux.alibaba.com> Date: Tue, 22 Aug 2023 20:17:09 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] erofs: release ztailpacking pclusters properly To: Jingbo Xu , chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: huyue2@coolpad.com, linux-kernel@vger.kernel.org References: <20230822110530.96831-1-jefflexu@linux.alibaba.com> From: Gao Xiang In-Reply-To: <20230822110530.96831-1-jefflexu@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 On 2023/8/22 19:05, Jingbo Xu wrote: > Currently ztailpacking pclusters are chained with FOLLOWED_NOINPLACE and > not recorded into the managed_pslots XArray. > > After commit 7674a42f35ea ("erofs: use struct lockref to replace > handcrafted approach"), ztailpacking pclusters won't be freed with > erofs_workgroup_put() anymore, which will cause the following issue: > > BUG erofs_pcluster-1 (Tainted: G OE ): Objects remaining in erofs_pcluster-1 on __kmem_cache_shutdown() > > Use z_erofs_free_pcluster() directly to free ztailpacking pclusters. > > Fixes: 7674a42f35ea ("erofs: use struct lockref to replace handcrafted approach") > Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Thanks, Gao Xiang