Skip to content

Commit

Permalink
io_uring: clean leftovers after splitting issue
Browse files Browse the repository at this point in the history
Kill extra if in io_issue_sqe() and place send/recv[msg] calls
appropriately under switch's cases.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
isilence authored and axboe committed Oct 10, 2020
1 parent a71976f commit 062d04d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -5831,18 +5831,16 @@ static int io_issue_sqe(struct io_kiocb *req, bool force_nonblock,
ret = io_sync_file_range(req, force_nonblock);
break;
case IORING_OP_SENDMSG:
ret = io_sendmsg(req, force_nonblock, cs);
break;
case IORING_OP_SEND:
if (req->opcode == IORING_OP_SENDMSG)
ret = io_sendmsg(req, force_nonblock, cs);
else
ret = io_send(req, force_nonblock, cs);
ret = io_send(req, force_nonblock, cs);
break;
case IORING_OP_RECVMSG:
ret = io_recvmsg(req, force_nonblock, cs);
break;
case IORING_OP_RECV:
if (req->opcode == IORING_OP_RECVMSG)
ret = io_recvmsg(req, force_nonblock, cs);
else
ret = io_recv(req, force_nonblock, cs);
ret = io_recv(req, force_nonblock, cs);
break;
case IORING_OP_TIMEOUT:
ret = io_timeout(req);
Expand Down

0 comments on commit 062d04d

Please sign in to comment.