summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.org>2026-09-25 20:16:09 -0300
committerPaulo Alcantara <pc@manguebit.org>2026-09-30 14:23:26 -0300
commit3581f843defa0bb30fd7da1e7dba170465e13a95 (patch)
tree6818280a7b8ac1d5073c9b255ac689945255e753 /tools/lib/python/kdoc/parse_data_structs.py
parentaa994489bd835547c191827acc460192e147032d (diff)
downloadlinux-next-3581f843defa0bb30fd7da1e7dba170465e13a95.tar.gz
linux-next-3581f843defa0bb30fd7da1e7dba170465e13a95.zip
smb: client: drain outstanding I/O before truncating on O_TRUNC open
cifs_do_truncate() flushes the pagecache with filemap_write_and_wait() before resetting the file size to zero, but that does not wait for direct/async I/O that was already in flight, which can complete after the truncate and reinstate stale data past the new EOF. Drain outstanding netfs I/O with netfs_wait_for_outstanding_io() before resizing the file. Reported-by: Frank Sorenson <sorenson@redhat.com> Fixes: a8603b52b39f ("smb: client: fix data corruption with concurrent writes and O_TRUNC") 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/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions