提交 e7436342 编写于 作者: P Pavel Begunkov 提交者: Joseph Qi

io_uring: cleanup io_import_fixed()

to #26323578

commit 7d009165550adc64e3561c65ecce564125052e00 upstream.

Clean io_import_fixed() call site and make it return proper type.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
Acked-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
上级 505210f7
...@@ -1486,7 +1486,7 @@ static void kiocb_done(struct kiocb *kiocb, ssize_t ret, struct io_kiocb **nxt, ...@@ -1486,7 +1486,7 @@ static void kiocb_done(struct kiocb *kiocb, ssize_t ret, struct io_kiocb **nxt,
io_rw_done(kiocb, ret); io_rw_done(kiocb, ret);
} }
static int io_import_fixed(struct io_ring_ctx *ctx, int rw, static ssize_t io_import_fixed(struct io_ring_ctx *ctx, int rw,
const struct io_uring_sqe *sqe, const struct io_uring_sqe *sqe,
struct iov_iter *iter) struct iov_iter *iter)
{ {
...@@ -1577,11 +1577,9 @@ static ssize_t io_import_iovec(int rw, struct io_kiocb *req, ...@@ -1577,11 +1577,9 @@ static ssize_t io_import_iovec(int rw, struct io_kiocb *req,
* flag. * flag.
*/ */
opcode = READ_ONCE(sqe->opcode); opcode = READ_ONCE(sqe->opcode);
if (opcode == IORING_OP_READ_FIXED || if (opcode == IORING_OP_READ_FIXED || opcode == IORING_OP_WRITE_FIXED) {
opcode == IORING_OP_WRITE_FIXED) {
ssize_t ret = io_import_fixed(req->ctx, rw, sqe, iter);
*iovec = NULL; *iovec = NULL;
return ret; return io_import_fixed(req->ctx, rw, sqe, iter);
} }
if (!req->has_user) if (!req->has_user)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册