]> git.baikalelectronics.ru Git - kernel.git/commitdiff
io_uring: clean leftovers after splitting issue
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 10 Oct 2020 17:34:12 +0000 (18:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 10 Oct 2020 18:49:25 +0000 (12:49 -0600)
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>
fs/io_uring.c

index 3ce72d48eb2110d45ffa00e9f6a5e155d5f2d88a..2e0105c373ae0a284315bb5a79886d8f0bff22ac 100644 (file)
@@ -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);