Commit 9aaf3543 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: simplify nxt propagation in io_queue_sqe

Don't overuse goto's, complex control flow doesn't make compilers happy
and makes code harder to read.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent feaadc4f
...@@ -6188,7 +6188,6 @@ static void __io_queue_sqe(struct io_kiocb *req, struct io_comp_state *cs) ...@@ -6188,7 +6188,6 @@ static void __io_queue_sqe(struct io_kiocb *req, struct io_comp_state *cs)
*/ */
if (ret == -EAGAIN && !(req->flags & REQ_F_NOWAIT)) { if (ret == -EAGAIN && !(req->flags & REQ_F_NOWAIT)) {
if (!io_arm_poll_handler(req)) { if (!io_arm_poll_handler(req)) {
punt:
/* /*
* Queued up for async execution, worker will release * Queued up for async execution, worker will release
* submit reference when the iocb is actually submitted. * submit reference when the iocb is actually submitted.
...@@ -6217,12 +6216,9 @@ static void __io_queue_sqe(struct io_kiocb *req, struct io_comp_state *cs) ...@@ -6217,12 +6216,9 @@ static void __io_queue_sqe(struct io_kiocb *req, struct io_comp_state *cs)
if (nxt) { if (nxt) {
req = nxt; req = nxt;
if (!(req->flags & REQ_F_FORCE_ASYNC))
if (req->flags & REQ_F_FORCE_ASYNC) { goto again;
linked_timeout = NULL; io_queue_async_work(req);
goto punt;
}
goto again;
} }
exit: exit:
if (old_creds) if (old_creds)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment