summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorSeongjae Jeong <jsjlee1020@gmail.com>2026-08-24 02:32:31 +0000
committerJaegeuk Kim <jaegeuk@kernel.org>2026-08-24 15:21:58 +0000
commit3b2c5d35cf4398edf47c4a3ad076838654a30015 (patch)
treee195122e3752aa62869b445367beb1ef9a56dd47 /scripts/const_structs.checkpatch
parentdafb84f092a6387748b2df4c8f647d46873bc1a0 (diff)
downloadlinux-3b2c5d35cf4398edf47c4a3ad076838654a30015.tar.gz
linux-3b2c5d35cf4398edf47c4a3ad076838654a30015.zip
f2fs: use adjusted write range after f2fs_write_checks()
generic_write_checks() in f2fs_write_checks() can adjust iocb->ki_pos for append writes and truncate the iterator to limit the number of bytes to write. In f2fs_file_write_iter(), the pinned-file overwrite check currently uses the position and count saved before f2fs_write_checks(), so it can check a range different from the actual write range. The forced buffered I/O cleanup also uses orig_pos saved before f2fs_write_checks(). For O_APPEND writes, this can make the cleanup flush and invalidate the wrong page cache range. Move the pinned-file overwrite check after f2fs_write_checks() and use the adjusted iocb->ki_pos and iov_iter_count(from). Also save the adjusted write position and use it for the forced buffered I/O cleanup. Fixes: 3fdd89b452c2 ("f2fs: prevent writing without fallocate() for pinned files") Fixes: 92318f20d703 ("f2fs: preserve direct write semantics when buffering is forced") Signed-off-by: Seongjae Jeong <jsjlee1020@gmail.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions