summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-10-22 18:47:17 +0300
committerJens Axboe <axboe@kernel.dk>2020-10-23 22:07:12 +0300
commit9aaf354352f1142831457492790d6bfa9c883021 (patch)
tree18276d1e4695df05950fe985d7125e56eee62747 /fs
parentfeaadc4fc2ebdbd53ffed1735077725855a2af53 (diff)
downloadlinux-9aaf354352f1142831457492790d6bfa9c883021.tar.xz
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: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 3606ea572e61..4d647d91dab2 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6188,7 +6188,6 @@ again:
*/
if (ret == -EAGAIN && !(req->flags & REQ_F_NOWAIT)) {
if (!io_arm_poll_handler(req)) {
-punt:
/*
* Queued up for async execution, worker will release
* submit reference when the iocb is actually submitted.
@@ -6217,12 +6216,9 @@ punt:
if (nxt) {
req = nxt;
-
- if (req->flags & REQ_F_FORCE_ASYNC) {
- linked_timeout = NULL;
- goto punt;
- }
- goto again;
+ if (!(req->flags & REQ_F_FORCE_ASYNC))
+ goto again;
+ io_queue_async_work(req);
}
exit:
if (old_creds)