summaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2023-09-13 18:28:15 +0200
committerChristian Brauner <brauner@kernel.org>2023-09-20 14:22:01 +0200
commit8287474aa5ffb41df52552c4ae4748e791d2faf2 (patch)
tree34a5b4df660fac2032abb851c71c6b3eefac85ad /fs/coda
parent2251588143f65636cf3f3f12beb009084fa2d5d7 (diff)
downloadlinux-stable-8287474aa5ffb41df52552c4ae4748e791d2faf2.tar.gz
linux-stable-8287474aa5ffb41df52552c4ae4748e791d2faf2.tar.bz2
linux-stable-8287474aa5ffb41df52552c4ae4748e791d2faf2.zip
direct_write_fallback(): on error revert the ->ki_pos update from buffered write
If we fail filemap_write_and_wait_range() on the range the buffered write went into, we only report the "number of bytes which we direct-written", to quote the comment in there. Which is fine, but buffered write has already advanced iocb->ki_pos, so we need to roll that back. Otherwise we end up with e.g. write(2) advancing position by more than the amount it reports having written. Fixes: 182c25e9c157 "filemap: update ki_pos in generic_perform_write" Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Message-Id: <20230827214518.GU3390869@ZenIV> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/coda')
0 files changed, 0 insertions, 0 deletions