From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) (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 85BA437E5E6 for ; Wed, 15 Jul 2026 06:10:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.171.160.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784095812; cv=none; b=jMzLD0ZNQCApSylDc5+mACu4dQt56doG63k+mX7TYrzOuL4XPZkRG4FzRwIGkNBTJP4feU2jJNB335iPpzCvLm7D7W2jfH0cQ7n1IdO1t4WXaxCUEJJCjhFDb8MdzzhsqyIpAE+i/EX6tim88MZ9tjwq5m7ePAKoFWbWI1wAOEw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784095812; c=relaxed/simple; bh=3L+2aF7Su5XVKule5ij7jR25s3uRsReV5QYWkmvhq1s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=XJXIv/CPgG3j42oDJHPAXefFtt+0qyCkDyplEbce4l5HwKv3YNjrOtCO0V44yGIsrNXQF2H7MZn5nvVL45MbuaMjpM++eh3CTShFRhkCo9AlBUnr+TlmxPL8t/znbqz/Hg9EvMVKXTP39Y70RDLGzsF43zafOnHXOZv1A5aj5a8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mail.parknet.co.jp; spf=pass smtp.mailfrom=parknet.co.jp; dkim=pass (2048-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b=NMXMXtd0; dkim=permerror (0-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b=szR8wdt8; arc=none smtp.client-ip=210.171.160.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mail.parknet.co.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=parknet.co.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b="NMXMXtd0"; dkim=permerror (0-bit key) header.d=parknet.co.jp header.i=@parknet.co.jp header.b="szR8wdt8" Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id 98E3D209655C; Wed, 15 Jul 2026 15:00:26 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=parknet.co.jp; s=20250114; t=1784095226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Dn5B/TwbptDWdyw2FkAUK3xJUtrVih2EVzVOxE11o3Q=; b=NMXMXtd0Tvi3OM3+Vawkl9f8ySdJQYIsR34q5UdT6Av8YwqhCv6IMkZDpPpdifetcyyj9u irgogOmS/Dwn0S4ONPmRKzo/mvth7Jdro8Rft5P4a8MSJ124nutJogCkXs9G9deHqDiK/e OKB5ssNsNlRVKSYoo/iXaz1HG1v24iSSEnGjnPE6XnP5F9dnixzEi6wef//4yMs5Iad8Z6 uGQHTFuu029PI97bghu0/oO4lR+MCcJdnyj7szDcg5i0HLzBt1i6CciCkHAMF4krDoiCk6 zHeYK8n+KfrvfCcMsc9UJUdqGuTxqreoYqeS8R1SdzxofRR2QXsDjQsJTBbVNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=parknet.co.jp; s=20250114-ed25519; t=1784095226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Dn5B/TwbptDWdyw2FkAUK3xJUtrVih2EVzVOxE11o3Q=; b=szR8wdt8XWHzcy5Wi/YYxh3QIPj8f+StwbXk/FZbuqPFJFprbgy/ZCun9asKLYZGSBXHNm rB+zWp2jFpTV72CQ== Received: from devron.myhome.or.jp (devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (Postfix) with ESMTPS id 20A1BE00282; Wed, 15 Jul 2026 15:00:26 +0900 (JST) Received: by devron.myhome.or.jp (Postfix, from userid 1000) id 0B221220029B; Wed, 15 Jul 2026 15:00:26 +0900 (JST) From: OGAWA Hirofumi To: Andrew Morton Cc: Yichong Chen , Ravishankar N , Amit Sahrawat , Namjae Jeon , linux-kernel@vger.kernel.org Subject: Re: [PATCH] fat: release buffer head after rebuilding parent In-Reply-To: <20260715020957.1096309-1-chenyichong@uniontech.com> References: <20260715020957.1096309-1-chenyichong@uniontech.com> Date: Wed, 15 Jul 2026 15:00:25 +0900 Message-ID: <877bmwiyh2.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Yichong Chen writes: > fat_scan_logstart() leaves the matching directory entry's buffer head in > sinfo.bh for the caller to release, just like fat_scan(). > > fat_rebuild_parent() uses the directory entry to rebuild the parent inode > for the nostale_ro NFS export path, but does not release sinfo.bh after a > successful scan. Release it once fat_build_inode() has consumed the > directory entry data. > > Fixes: f1e6fb0ab451 ("fat (exportfs): rebuild directory-inode if fat_dget()") > Signed-off-by: Yichong Chen Looks good, thanks. Acked-by: OGAWA Hirofumi > --- > fs/fat/nfs.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/fat/nfs.c b/fs/fat/nfs.c > index 509eea9..6e1b371 100644 > --- a/fs/fat/nfs.c > +++ b/fs/fat/nfs.c > @@ -250,8 +250,10 @@ struct inode *fat_rebuild_parent(struct super_block *sb, int parent_logstart) > MSDOS_I(dummy_grand_parent)->i_pos = -1; > } > > - if (!fat_scan_logstart(dummy_grand_parent, clus_to_match, &sinfo)) > + if (!fat_scan_logstart(dummy_grand_parent, clus_to_match, &sinfo)) { > parent = fat_build_inode(sb, sinfo.de, sinfo.i_pos); > + brelse(sinfo.bh); > + } > > brelse(parent_bh); > iput(dummy_grand_parent); -- OGAWA Hirofumi