Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp46432rdb; Wed, 21 Feb 2024 16:43:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXeT0ZHIh5X/7AV8Adi5KPo0pH+4YhhzuNNqeSlDDhTdFB+OR+ItkuOS3fJ4zCmvWoWpX5G2QOSShzpGcy3D6MG8DU7WSV9/tikFB306A== X-Google-Smtp-Source: AGHT+IE2PkXwHwMeKzMfSyyOfbGyzCCf4FHwV8/hOMrb5bB63rmZeKhv+usdsbGafibd8LtYxF7a X-Received: by 2002:a17:906:71ca:b0:a3e:a383:3581 with SMTP id i10-20020a17090671ca00b00a3ea3833581mr913827ejk.24.1708562582628; Wed, 21 Feb 2024 16:43:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708562582; cv=pass; d=google.com; s=arc-20160816; b=EYamB8J2Zc490m1G6w3pMk/sDWQ5Qp/rPjVhQuCZlyZyQPTQl16wHODbUnRYCyfVfk MGO5x8YvOFEz0x7vDmAg+Rv2ZPnvkrMZqPg24SyNCjPlehl4LebNO7viwzOrWy/cqNpu 7UCgD/Igj4xDOeVpHwma+gvbAbbITpaMKMZ7wYQfRlvjY14jHl7Rh8TppgoCwZp+w9I1 ExQuQQI3LEI6RA5hetRNlDEJRIaoiUedUEMTDsVUUYPKHvcl9Ai541QYpkhvOJXPmZ5e 3OLnXOjPtMotFrfKqTCDXv55JhFv024BBof2/5FrOc9VJFnmW3A9A7HPJzmBgaSV87jE inKA== 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:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=bc767eLSlzPgendXABGin4+FYXyl7PNu++RDaun+rLo=; fh=FK8w6Cs1q5mhZ8PixpX6KCFqAEpJzWd9wMo9oTf7Fbk=; b=figRIfWzfIaoFx3QFtcdVCnp6qtQEw6ktDBmjWBXsQ4kHy2Mpe/HMDzB15K7dFjTXx YVBWKW3ejk4kiNIiauwgaU5n1wCCyv6RNEL1oZWbZ6AZ57deojMBdUrLMpMUrFXcIEho mg/PifaYekxqNjIFmmeo3QAUDO6BssrVOg8MSEBJHvs+NUCfC9rTRL86uZAdVKkYTwI+ Btp/CPGJm2+Fm03Yh7NWAUz8EqAx+myEH9sqtw0D9GrTu0RsurP+qhpXsD59mAXnPctD 4yUKhCWfNUCv80t9tJHrwSEiqpETqymFrj5JN2atIWw1Kz7cwAjRMacPqei+eeHTloH0 l1Mg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=XRsRf3h1; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-75739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a59-20020a509ec1000000b005639556994fsi5041028edf.355.2024.02.21.16.43.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 16:43:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=XRsRf3h1; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-75739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 617FD1F23ED0 for ; Thu, 22 Feb 2024 00:43:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D898F10A23; Thu, 22 Feb 2024 00:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="XRsRf3h1" Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) (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 939EC290E; Thu, 22 Feb 2024 00:42:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708562574; cv=none; b=ogtfoCbvuz6gqD/RAFAyR2Ahq4zzbChvKO9NuP8c5u/GCtMgGhBbe5/+ytmuFQDcTjIrUa9ly2TppYQzQYAOF3h/FzRWPH2N92pzEvLSV/Pi3J+rq+GyjsKXorF5x8dVilfaBAMM7V8YaDkbiwbl41BkXy2veXdEr2LlI7sBPiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708562574; c=relaxed/simple; bh=XElSFnnAK4/2BauxNxlIJOy+CLSVH6//ipTSu2hNyKg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=X5sfxqBvoLZ8GbAhWDJ2jgfSahPor2Q51VEz/5NaMQhwi9Hqbtcoo7ihvr5vh3JASdARRmPVSqWGcqnw6oOOuhjNrkMOljOTx/SdvaJxCx4HD32EV4KnuG9m2huUTofCJHKs4oxe/Vko1SDMUbYDtS/s4GoK6cjaPLBKn7T5phQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=XRsRf3h1; arc=none smtp.client-ip=115.124.30.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1708562568; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=bc767eLSlzPgendXABGin4+FYXyl7PNu++RDaun+rLo=; b=XRsRf3h1cCKksr+NRWNkw2cLqsqBJcwntM+02YfFEDYxeRX5s7ddN6BBkRsMf8I1OSmflOMQKHFWwtm2gSM/Li5lukRyP9yuO/2/PwlNEfEr/jRGcWaqiDGfHbqIVvkeQf9d4PKSBtjPpvqr9hiW0JVJE9bUgk5vdNAGmvqcceY= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0W1.6KSP_1708562566; Received: from 192.168.71.128(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0W1.6KSP_1708562566) by smtp.aliyun-inc.com; Thu, 22 Feb 2024 08:42:47 +0800 Message-ID: <85099656-4d7c-4992-a149-0942ebbea1d1@linux.alibaba.com> Date: Thu, 22 Feb 2024 08:42:46 +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 To: Sandeep Dhavale , Gao Xiang , Chao Yu , 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: Gao Xiang 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 05: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: Gao Xiang Thanks, Gao Xiang