On Wed, May 24, 2023 at 09:07:22AM +0200, Miklos Szeredi wrote: > > - endbyte = pos + written_buffered - 1; > > + endbyte = iocb->ki_pos + written_buffered - 1; > > Wrong endpos. > > > > > - err = filemap_write_and_wait_range(file->f_mapping, pos, > > + err = filemap_write_and_wait_range(file->f_mapping, > > + iocb->ki_pos, > > Wrong startpos. Yeah, fixed for the next version.