提交 afb87658 编写于 作者: P Pavel Begunkov 提交者: Jens Axboe

io_uring: refactor io_req_map_rw()

Set rw->free_iovec to @iovec, that gives an identical result and stresses
that @iovec param rw->free_iovec play the same role.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 f4bff104
......@@ -3010,7 +3010,7 @@ static void io_req_map_rw(struct io_kiocb *req, const struct iovec *iovec,
struct io_async_rw *rw = &req->io->rw;
memcpy(&rw->iter, iter, sizeof(*iter));
rw->free_iovec = NULL;
rw->free_iovec = iovec;
rw->bytes_done = 0;
/* can only be fixed buffers, no need to do anything */
if (iter->type == ITER_BVEC)
......@@ -3027,7 +3027,6 @@ static void io_req_map_rw(struct io_kiocb *req, const struct iovec *iovec,
memcpy(rw->fast_iov + iov_off, fast_iov + iov_off,
sizeof(struct iovec) * iter->nr_segs);
} else {
rw->free_iovec = iovec;
req->flags |= REQ_F_NEED_CLEANUP;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册