Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp181554rdb; Wed, 21 Feb 2024 23:36:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV5dNU6CyaSUTRiRBQ4/5O7UgfKHeHFvZyVdwQU6uXQUzdwEmSKvgx/94ueFvJqBlEoUFfxQUPDdFNiFLatlM2JVygEeYx44frlYof15g== X-Google-Smtp-Source: AGHT+IGdYi4cGodJ6nghjZzDhxHLEMII2+iP7bsmKh8M86O3UCKdFE0/1yT1ro1QnJ3qIsV2w879 X-Received: by 2002:a17:902:e84c:b0:1db:b96f:4a50 with SMTP id t12-20020a170902e84c00b001dbb96f4a50mr2834349plg.14.1708587363571; Wed, 21 Feb 2024 23:36:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708587363; cv=pass; d=google.com; s=arc-20160816; b=p6He2VYmNyCnaJfoNGu9rCaVsheM/dZhYlxZgLvn1HWM34JfEgH7YQdU6lIx9T0Yo6 RUiyQWKoIhpFc1pbKUddk89vxtPWjDB5yFJ/PK3fnDCrbjvSnRPmMB/Womk/ac0UO9OA 5UwuiJQyWNyVGx2ESueJEsyea+PVdPouKD3DqopZ60hKdXE2fDt58w+9KUMF4NjgnT1J D53VKths3rsVwUnS1q/M+2DYUrgjYAjLUB9OlWMeTXocu7Ou6MmA+d32/D9rqudMewvA 7/7NS2Ms2RUVN0v3JYN6Mjf9nZ/tDSigepTLXmbEXXnpIwrWx3Alq8fmxhYigVsvmPbB YXjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=vT7yYUFnWVr6rt5GTlbumUfbGEsWw4JVtsbSCZdygvk=; fh=0n0ARqZC9asuDRe8gwk8wdhij5K3uebBE2mgMXRRWFQ=; b=egf38Lmcg8NmBh/3gYl5DTLa3C9oBxzgFKLOvTxopXxarn8e6dnl9kahvT3cGNbBRE puJ9y/jllbHrqF5ELct8/ltKdORGzXQtZ0Hb2M6pI6gZQZGFsl8GdeTLiuPxr4FsfZLB RpqkNnIVnHMIEC/f9zOkTxhPQQXbJaoPiM4BuzYG6SGzZf3xjznqmZHkp7M0HLOB759x vzLb3/+CMufP9Tk5TcZ1oteDaFo+fojpGADlzHGBPfLcAxOXkTDrbvx/sO9alpfeFY7W GGkEdUFfej2PwH9QMpZURsqKqAewz4f72DP0Fm1mg+0fX9Gq2QaVhkj3l7DqhO/ra/PB JP2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FItXX0at; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m8-20020a170902db0800b001dbe8935e1dsi7805120plx.514.2024.02.21.23.36.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 23:36:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FItXX0at; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-76015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4E468B22FA3 for ; Thu, 22 Feb 2024 07:35:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E9481799F; Thu, 22 Feb 2024 07:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FItXX0at" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 743FE290A; Thu, 22 Feb 2024 07:35:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708587347; cv=none; b=huzNtuNCwBsC1jpdtpRY/asAvn31PLigejCDRz6U27IygTbyde+qKlvt5wOMbTDZ2Jgo+FcHPkqEx1iz/BzS6x7ylD046+iEcRj++nzsvaUJGWPaky8vW6PCDhpVM6mjgF1Rwa3rBl6dQogFIPRmprsqxC1qI+pxE4szHpGEfUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708587347; c=relaxed/simple; bh=/gg6HLF1iVc0ufJm2KfXB3s9/qrmwuJTBEsKy5Ju3CQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OXyecHVd/dsWkbwE3IhbKVlVHlgJ4fBodjKBslUIrtZAlH6dlPjWrGK78rG/0Dz+oYmdNZxuFWl18f8iBA5SXebmW49iv2aqyWdB/FAjgmLRB973EMNtEfsXNehNK3iRkc8PvYbu+QB56fJa7WqHFILjf+P+GzVZ2tigpTRzGBg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FItXX0at; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66413C433C7; Thu, 22 Feb 2024 07:35:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708587347; bh=/gg6HLF1iVc0ufJm2KfXB3s9/qrmwuJTBEsKy5Ju3CQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FItXX0atqDVJdSO1Mfc/40AiapAWskiKnq9zL2oS2mm9+kzD56o7fNbV91yzoA8eM RAJTFEnxz7s6CLqzlajoYgAwf/uE3XXD/8A9vo8sDLZe9cmqp0JAADAK2cyDnAHXuu G6tmuLc/4/gwZSwk9jY2NdUaPwTnBInpgOW4p9iRkvKZvfbgQF48SI+CBffipUVdef d7OC33Jcba0SJn6ahtRcbU0DvAyyu6SpmrF+pmuCztU3vXKyZ4pge3YvB/XaS9XsWE 4aHOfOtOrR2qB2wUg//b5CTkmFXNSjqJ+CRiK+h3p96888P51y/SCMlA/cFrbNv35L IB+IIccn1kCdw== Message-ID: <12b7187d-73c9-488c-a7cb-93ca31bc74e5@kernel.org> Date: Thu, 22 Feb 2024 15:35:41 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] erofs: fix refcount on the metabuf used for inode lookup Content-Language: en-US To: Sandeep Dhavale , Gao Xiang , Yue Hu , Jeffle Xu Cc: quic_wenjieli@quicinc.com, stable@vger.kernel.org, kernel-team@android.com, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20240221210348.3667795-1-dhavale@google.com> From: Chao Yu In-Reply-To: <20240221210348.3667795-1-dhavale@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/2/22 5:03, Sandeep Dhavale wrote: > In erofs_find_target_block() when erofs_dirnamecmp() returns 0, > we do not assign the target metabuf. This causes the caller > erofs_namei()'s erofs_put_metabuf() at the end to be not effective > leaving the refcount on the page. > As the page from metabuf (buf->page) is never put, such page cannot be > migrated or reclaimed. Fix it now by putting the metabuf from > previous loop and assigning the current metabuf to target before > returning so caller erofs_namei() can do the final put as it was > intended. > > Fixes: 500edd095648 ("erofs: use meta buffers for inode lookup") > Cc: stable@vger.kernel.org > Signed-off-by: Sandeep Dhavale Reviewed-by: Chao Yu Thanks,