aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <[email protected]>2021-02-28 22:35:16 +0000
committerJens Axboe <[email protected]>2021-04-11 17:41:58 -0600
commit2e052d443df15d71277f6b8509badae4310ebd92 (patch)
tree98c674c555728bc4f3cbb1c15fd762cc0eb5cb48
parent8c3f9cd1603d0e4af6c50ebc6d974ab7bdd03cf4 (diff)
io_uring: refactor out send/recv async setup
IORING_OP_[SEND,RECV] don't need async setup neither will get into io_req_prep_async(). Remove them from io_req_prep_async() and remove needs_async_data checks from the related setup functions. Signed-off-by: Pavel Begunkov <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--fs/io_uring.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index bb497511fadb..7833ccd085ba 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4349,8 +4349,6 @@ static int io_sendmsg_prep_async(struct io_kiocb *req)
{
int ret;
- if (!io_op_defs[req->opcode].needs_async_data)
- return 0;
ret = io_sendmsg_copy_hdr(req, req->async_data);
if (!ret)
req->flags |= REQ_F_NEED_CLEANUP;
@@ -4578,8 +4576,6 @@ static int io_recvmsg_prep_async(struct io_kiocb *req)
{
int ret;
- if (!io_op_defs[req->opcode].needs_async_data)
- return 0;
ret = io_recvmsg_copy_hdr(req, req->async_data);
if (!ret)
req->flags |= REQ_F_NEED_CLEANUP;
@@ -5892,10 +5888,8 @@ static int io_req_prep_async(struct io_kiocb *req)
case IORING_OP_WRITE:
return io_rw_prep_async(req, WRITE);
case IORING_OP_SENDMSG:
- case IORING_OP_SEND:
return io_sendmsg_prep_async(req);
case IORING_OP_RECVMSG:
- case IORING_OP_RECV:
return io_recvmsg_prep_async(req);
case IORING_OP_CONNECT:
return io_connect_prep_async(req);