summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.org>2026-09-26 17:44:50 -0300
committerPaulo Alcantara <pc@manguebit.org>2026-09-30 14:23:58 -0300
commit8db55c5cd831a786a1a2a2d391aa80354535a353 (patch)
tree8ddeb6556f55444cf8d6044fe927e849e2016410 /tools/lib/python
parentfafc68cccf8a00ed0a1f47c1413a3f16ce4dcdfa (diff)
downloadlinux-next-8db55c5cd831a786a1a2a2d391aa80354535a353.tar.gz
linux-next-8db55c5cd831a786a1a2a2d391aa80354535a353.zip
netfs: zero gaps in read-gaps folio to avoid writing back stale data
netfs_read_gaps() leaves gaps around a streaming write's dirty region unread on the server side, so a short/EOF response there left stale folio content that later got written back. Zero it after the read completes, not before: netfs_wait_for_read() returns rreq->transferred once ret >= 0, so build an iterator over the same bvec array the read used, advance past ret, and zero the rest. The dirty region already maps to sink pages in that array rather than the real folio, so this can't touch it, and only the actual shortfall gets zeroed instead of the whole gap upfront. Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading") Reviewed-by: David Howells <dhowells@redhat.com> Reviewed-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Paulo Alcantara <pc@manguebit.org> Cc: Christian Brauner <brauner@kernel.org> Cc: Matthew Wilcox <willy@infradead.org> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Shyam Prasad N <sprasad@microsoft.com> Cc: Tom Talpey <tom@talpey.com> Cc: Bharath SM <bharathsm@microsoft.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions