On Mon, May 22, 2023 at 09:01:05AM +0900, Damien Le Moal wrote: > > - int ret; > > + ssize_t ret; > > > > if (iocb->ki_flags & IOCB_NOWAIT) > > iter.flags |= IOMAP_NOWAIT; > > > > while ((ret = iomap_iter(&iter, ops)) > 0) > > iter.processed = iomap_write_iter(&iter, i); > > - if (iter.pos == iocb->ki_pos) > > + > > + if (unlikely(ret < 0)) > > Nit: This could be if (unlikely(ret <= 0)), no ? No. iomap_iter does not return te amount of bytes written.