* [PATCH] netfs: clear PG_private_2 on copy-to-cache append failure
@ 2026-07-04 5:06 Yichong Chen
2026-07-22 7:13 ` Yichong Chen
0 siblings, 1 reply; 3+ messages in thread
From: Yichong Chen @ 2026-07-04 5:06 UTC (permalink / raw)
To: David Howells, Paulo Alcantara
Cc: netfs, linux-fsdevel, linux-kernel, Yichong Chen
netfs_pgpriv2_copy_to_cache() marks the folio with PG_private_2 before
netfs_pgpriv2_copy_folio() appends it to the copy-to-cache rolling
buffer.
If the append fails, the folio is not queued for cache writeback, so
the PG_private_2 state and its reference must be released immediately.
Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
---
fs/netfs/read_pgpriv2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/netfs/read_pgpriv2.c b/fs/netfs/read_pgpriv2.c
index a1489aa29f78..7eacc58abadb 100644
--- a/fs/netfs/read_pgpriv2.c
+++ b/fs/netfs/read_pgpriv2.c
@@ -54,6 +54,7 @@ static void netfs_pgpriv2_copy_folio(struct netfs_io_request *creq, struct folio
/* 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;
}
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] netfs: clear PG_private_2 on copy-to-cache append failure
2026-07-04 5:06 [PATCH] netfs: clear PG_private_2 on copy-to-cache append failure Yichong Chen
@ 2026-07-22 7:13 ` Yichong Chen
2026-07-22 12:55 ` Christian Brauner
0 siblings, 1 reply; 3+ messages in thread
From: Yichong Chen @ 2026-07-22 7:13 UTC (permalink / raw)
To: David Howells, Paulo Alcantara
Cc: netfs, linux-fsdevel, linux-kernel, Yichong Chen
Hi,
Ping. Any comments on this patch?
Thanks,
Yichong
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] netfs: clear PG_private_2 on copy-to-cache append failure
2026-07-22 7:13 ` Yichong Chen
@ 2026-07-22 12:55 ` Christian Brauner
0 siblings, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2026-07-22 12:55 UTC (permalink / raw)
To: Yichong Chen
Cc: David Howells, Paulo Alcantara, netfs, linux-fsdevel, linux-kernel
On 2026-07-22 15:13 +0800, Yichong Chen wrote:
> Hi,
>
> Ping. Any comments on this patch?
David will pick it up and include it in his next round of fixes and then
I'll pick it up.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-22 12:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-04 5:06 [PATCH] netfs: clear PG_private_2 on copy-to-cache append failure Yichong Chen
2026-07-22 7:13 ` Yichong Chen
2026-07-22 12:55 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®