projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ab1edb
)
io_uring: clean up io_try_cancel
author
Pavel Begunkov
<asml.silence@gmail.com>
Thu, 16 Jun 2022 09:22:04 +0000
(10:22 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 25 Jul 2022 00:39:13 +0000
(18:39 -0600)
Get rid of an unnecessary extra goto in io_try_cancel() and simplify the
function.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/48cf5417b43a8386c6c364dba1ad9b4c7382d158.1655371007.git.asml.silence@gmail.com
Reviewed-by: Hao Xu <howeyxu@tencent.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/cancel.c
patch
|
blob
|
history
diff --git
a/io_uring/cancel.c
b/io_uring/cancel.c
index 6f2888388a40ed10f94c7b0b102f86f6688dec81..a253e2ad22ebd017f12e369210aafed7965dfc07 100644
(file)
--- a/
io_uring/cancel.c
+++ b/
io_uring/cancel.c
@@
-95,12
+95,12
@@
int io_try_cancel(struct io_kiocb *req, struct io_cancel_data *cd)
ret = io_poll_cancel(ctx, cd);
if (ret != -ENOENT)
- goto out;
+ return ret;
+
spin_lock(&ctx->completion_lock);
if (!(cd->flags & IORING_ASYNC_CANCEL_FD))
ret = io_timeout_cancel(ctx, cd);
spin_unlock(&ctx->completion_lock);
-out:
return ret;
}