Re: [PATCH] ext4: fix folio reference leak in mpage_submit_partial_folio()

From: Theodore Ts'o

Date: Thu Nov 19 2026 - 09:50:17 EST



On Fri, 16 Oct 2026 14:25:24 +0000, guolingxing wrote:
> mpage_submit_partial_folio() obtains a folio reference with
> filemap_get_folio(). If the subsequent position check fails, it
> returns -EINVAL without dropping that reference.
>
> Call folio_put() before returning from this error path. Leave the
> folio locked so that the caller can invalidate and unlock it through
> mpage_release_unused_pages().
>
> [...]

Applied, thanks!

[1/1] ext4: fix folio reference leak in mpage_submit_partial_folio()
commit: 49256cb63120897bdb6842c654ea46bc7700da17

Best regards,
--
Theodore Ts'o <tytso@xxxxxxx>