On 12/16/18 9:40 AM, Christoph Hellwig wrote: >> + do { >> + size_t size; >> + >> + bv = iter->bvec + iter->iov_offset; >> + size = bio_add_page(bio, bv->bv_page, bv->bv_len, bv->bv_offset); > > Overly long line here. Will fix. >> + if (size != bv->bv_len) >> + break; >> + iov_iter_advance(iter, size); >> + } while (iov_iter_count(iter) && !bio_full(bio)); > > bio_add_page already does the bio_full check for you. get_pages does the same thing, but I guess it makes more sense there since we'd have to undo if we could not add. -- Jens Axboe