FAILED: patch "[PATCH] f2fs: fix dentry folio leak in find_in_level" failed to apply to 6.1-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x cca7d3e30bf30333314e31bc70b9a739f1342167
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090915-cargo-unclothed-b04d@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From cca7d3e30bf30333314e31bc70b9a739f1342167 Mon Sep 17 00:00:00 2001
From: Guanghui Yang <[email protected]>
Date: Sun, 19 Jul 2026 16:45:14 +0800
Subject: [PATCH] f2fs: fix dentry folio leak in find_in_level
find_in_level() gets a dentry folio with f2fs_find_data_folio() before calling find_in_block(). If find_in_block() returns an error, the function stores the error in res_folio and breaks out of the loop without dropping the dentry folio.
This leaks the folio reference on the find_in_block() error path. Drop the dentry folio before returning the error to the caller.
fs/f2fs/dir.c +1 -0
@@ -320,6 +320,7 @@ static struct f2fs_dir_entry *find_in_level(struct inode *dir, de =find_in_block (dir, dentry_folio, fname, &max_slots, use_hash);if (IS_ERR (de)) { +f2fs_folio_put (dentry_folio, false); *res_folio =ERR_CAST (de); de =NULL ;break ;
Sasha Levin
maintainerPATCH 1/1 f2fs: fix dentry folio leak in find_in_level
From: Guanghui Yang <[email protected]>
[ Upstream commit cca7d3e30bf30333314e31bc70b9a739f1342167 ]
find_in_level() gets a dentry folio with f2fs_find_data_folio() before calling find_in_block(). If find_in_block() returns an error, the function stores the error in res_folio and breaks out of the loop without dropping the dentry folio.
This leaks the folio reference on the find_in_block() error path. Drop the dentry folio before returning the error to the caller.
--- fs/f2fs/dir.c | 1 + 1 file changed, 1 insertion(+)
fs/f2fs/dir.c +1 -0
@@ -374,6 +374,7 @@ static struct f2fs_dir_entry *find_in_level(struct inode *dir, de =find_in_block (dir, dentry_page, fname, &max_slots, use_hash);if (IS_ERR (de)) { +f2fs_put_page (dentry_page,0 ); *res_page =ERR_CAST (de); de =NULL ;break ;
Signature · 1 line
2.53.0