From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Yichong Chen <chenyichong@uniontech.com>,
Ravishankar N <ravi.n1@samsung.com>,
Amit Sahrawat <a.sahrawat@samsung.com>,
Namjae Jeon <namjae.jeon@samsung.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fat: release buffer head after rebuilding parent
Date: Wed, 15 Jul 2026 15:00:25 +0900 [thread overview]
Message-ID: <877bmwiyh2.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20260715020957.1096309-1-chenyichong@uniontech.com>
Yichong Chen <chenyichong@uniontech.com> 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 <chenyichong@uniontech.com>
Looks good, thanks.
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> ---
> 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 <hirofumi@mail.parknet.co.jp>
prev parent reply other threads:[~2026-07-15 6:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 2:09 [PATCH] fat: release buffer head after rebuilding parent Yichong Chen
2026-07-15 6:00 ` OGAWA Hirofumi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877bmwiyh2.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=a.sahrawat@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=chenyichong@uniontech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
--cc=ravi.n1@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.