Lines Matching refs:iovec
57 struct iovec __user *uiov; in io_iov_buffer_select_prep()
58 struct iovec iov; in io_iov_buffer_select_prep()
356 static struct iovec *__io_import_iovec(int ddir, struct io_kiocb *req, in __io_import_iovec()
363 struct iovec *iovec; in __io_import_iovec() local
394 iovec = s->fast_iov; in __io_import_iovec()
395 ret = __import_iovec(ddir, buf, sqe_len, UIO_FASTIOV, &iovec, iter, in __io_import_iovec()
399 return iovec; in __io_import_iovec()
403 struct iovec **iovec, struct io_rw_state *s, in io_import_iovec() argument
406 *iovec = __io_import_iovec(rw, req, s, issue_flags); in io_import_iovec()
407 if (unlikely(IS_ERR(*iovec))) in io_import_iovec()
408 return PTR_ERR(*iovec); in io_import_iovec()
444 struct iovec iovec; in loop_rw_iter() local
448 iovec = iov_iter_iovec(iter); in loop_rw_iter()
450 iovec.iov_base = u64_to_user_ptr(rw->addr); in loop_rw_iter()
451 iovec.iov_len = rw->len; in loop_rw_iter()
455 nr = file->f_op->read(file, iovec.iov_base, in loop_rw_iter()
456 iovec.iov_len, ppos); in loop_rw_iter()
458 nr = file->f_op->write(file, iovec.iov_base, in loop_rw_iter()
459 iovec.iov_len, ppos); in loop_rw_iter()
476 if (nr != iovec.iov_len) in loop_rw_iter()
483 static void io_req_map_rw(struct io_kiocb *req, const struct iovec *iovec, in io_req_map_rw() argument
484 const struct iovec *fast_iov, struct iov_iter *iter) in io_req_map_rw()
489 io->free_iovec = iovec; in io_req_map_rw()
494 if (!iovec) { in io_req_map_rw()
504 sizeof(struct iovec) * iter->nr_segs); in io_req_map_rw()
510 static int io_setup_async_rw(struct io_kiocb *req, const struct iovec *iovec, in io_setup_async_rw() argument
519 kfree(iovec); in io_setup_async_rw()
523 io_req_map_rw(req, iovec, s->fast_iov, &s->iter); in io_setup_async_rw()
534 struct iovec *iov; in io_rw_prep_async()
699 struct iovec *iovec; in io_read() local
707 ret = io_import_iovec(READ, req, &iovec, s, issue_flags); in io_read()
719 ret = io_import_iovec(READ, req, &iovec, s, issue_flags); in io_read()
730 iovec = NULL; in io_read()
734 kfree(iovec); in io_read()
742 ret = io_setup_async_rw(req, iovec, s, true); in io_read()
755 kfree(iovec); in io_read()
774 if (iovec) in io_read()
775 kfree(iovec); in io_read()
790 ret2 = io_setup_async_rw(req, iovec, s, true); in io_read()
791 iovec = NULL; in io_read()
838 if (iovec) in io_read()
839 kfree(iovec); in io_read()
847 struct iovec *iovec; in io_write() local
854 ret = io_import_iovec(WRITE, req, &iovec, s, issue_flags); in io_write()
862 iovec = NULL; in io_write()
866 kfree(iovec); in io_write()
892 kfree(iovec); in io_write()
948 ret = io_setup_async_rw(req, iovec, s, true); in io_write()
963 ret = io_setup_async_rw(req, iovec, s, false); in io_write()
972 if (iovec) in io_write()
973 kfree(iovec); in io_write()