Re: [PATCH 1/4] netfs: clear PG_private_2 on copy-to-cache append failure

From: Max Kellermann

Date: Tue Aug 11 2026 - 04:14:39 EST


On Tue, Aug 11, 2026 at 9:59 AM David Howells <dhowells@xxxxxxxxxx> wrote:
> /* Attach the folio to the rolling buffer. */
> if (rolling_buffer_append(&creq->buffer, folio, 0) < 0) {
> + folio_end_private_2(folio);
> clear_bit(NETFS_RREQ_FOLIO_COPY_TO_CACHE, &creq->flags);
> return;
> }

David, I submitted the same patch 4 months ago already, why didn't you
merge that?
https://lore.kernel.org/netfs/20260330105548.1371339-1-max.kellermann@xxxxxxxxx/

The "Fixes" tag in Yuchon Chen's patch is incorrect. Commit
e2d46f2ec332 ("netfs: Change the read result collector to only use one
work item") does not introduce the bug. The bug has existed ever since
netfs_pgpriv2_copy_folio() was initially added by commit ee4cdf7ba857
("netfs: Speed up buffered reading"), as my older patch states in its
"Fixes" tag.

--
Max Kellermann
Principal Architect
Hosting Technology

cm4all | Im Mediapark 6a | 50670 Köln | Germany
General information about the company can be found here:
https://www.cm4all.com/impressum
A member of the IONOS Group