On Sat, Jun 18, 2022 at 06:35:37AM +0100, Al Viro wrote: > get_page(*p++ = page); > - left -= size; Argh... if (left <= PAGE_SIZE - off) return maxsize; > + left -= PAGE_SIZE - off; > } > if (!npages) > return -EFAULT; > - maxsize -= left; > - iov_iter_advance(i, maxsize); > - return maxsize; > + return maxsize - left; > } > > static ssize_t iter_xarray_populate_pages(struct page **pages, struct xarray *xa, > -- > 2.30.2 >