Re: [PATCH] f2fs: fix dentry folio leak in find_in_level

From: Chao Yu

Date: Sun Jul 19 2026 - 03:17:56 EST


On 7/13/26 14:36, Guanghui Yang wrote:
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.


Need fixes and Cc stable lines.

Signed-off-by: Guanghui Yang <3497809730@xxxxxx>

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,