Files
Hungyu Lin 87ea037a91 coda: honor the append state of each write
coda_open() adds O_APPEND to the container file's f_flags after it has
been opened, without updating its cached f_iocb_flags. An O_APPEND write
can therefore overwrite existing data instead of appending. For example,
writing "Z" to a file containing "abc" produces "Zbc" rather than "abcZ".

Pass RWF_APPEND or RWF_NOAPPEND to vfs_iter_write() according to the
incoming IOCB_APPEND state. This also honors changes made with F_SETFL
and per-write append overrides instead of relying on the container's
open-time flags.

Fixes: 164f4064ca ("keep iocb_flags() result cached in struct file")
Cc: [email protected] # 6.9+
Signed-off-by: Hungyu Lin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-11 11:59:04 +01:00
..
2026-04-04 21:03:13 -04:00