From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>,
[email protected], Dylan Yudaken <[email protected]>
Subject: [PATCH 6/6] io_uring: remove unused return from io_disarm_next
Date: Thu, 8 Sep 2022 16:56:57 +0100 [thread overview]
Message-ID: <9a441c9a32a58bcc586076fa9a7d0dc33f1fb3cb.1662652536.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
We removed conditional io_commit_cqring_flush() guarding against
spurious eventfd and the io_disarm_next()'s return value is not used
anymore, just void it.
Signed-off-by: Pavel Begunkov <[email protected]>
---
io_uring/timeout.c | 13 +++----------
io_uring/timeout.h | 2 +-
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/io_uring/timeout.c b/io_uring/timeout.c
index 78ea2c64b70e..e8a8c2099480 100644
--- a/io_uring/timeout.c
+++ b/io_uring/timeout.c
@@ -149,11 +149,10 @@ static inline void io_remove_next_linked(struct io_kiocb *req)
nxt->link = NULL;
}
-bool io_disarm_next(struct io_kiocb *req)
+void io_disarm_next(struct io_kiocb *req)
__must_hold(&req->ctx->completion_lock)
{
struct io_kiocb *link = NULL;
- bool posted = false;
if (req->flags & REQ_F_ARM_LTIMEOUT) {
link = req->link;
@@ -161,7 +160,6 @@ bool io_disarm_next(struct io_kiocb *req)
if (link && link->opcode == IORING_OP_LINK_TIMEOUT) {
io_remove_next_linked(req);
io_req_tw_post_queue(link, -ECANCELED, 0);
- posted = true;
}
} else if (req->flags & REQ_F_LINK_TIMEOUT) {
struct io_ring_ctx *ctx = req->ctx;
@@ -169,17 +167,12 @@ bool io_disarm_next(struct io_kiocb *req)
spin_lock_irq(&ctx->timeout_lock);
link = io_disarm_linked_timeout(req);
spin_unlock_irq(&ctx->timeout_lock);
- if (link) {
- posted = true;
+ if (link)
io_req_tw_post_queue(link, -ECANCELED, 0);
- }
}
if (unlikely((req->flags & REQ_F_FAIL) &&
- !(req->flags & REQ_F_HARDLINK))) {
- posted |= (req->link != NULL);
+ !(req->flags & REQ_F_HARDLINK)))
io_fail_links(req);
- }
- return posted;
}
struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req,
diff --git a/io_uring/timeout.h b/io_uring/timeout.h
index 858c62644897..a6939f18313e 100644
--- a/io_uring/timeout.h
+++ b/io_uring/timeout.h
@@ -27,7 +27,7 @@ int io_timeout_cancel(struct io_ring_ctx *ctx, struct io_cancel_data *cd);
__cold bool io_kill_timeouts(struct io_ring_ctx *ctx, struct task_struct *tsk,
bool cancel_all);
void io_queue_linked_timeout(struct io_kiocb *req);
-bool io_disarm_next(struct io_kiocb *req);
+void io_disarm_next(struct io_kiocb *req);
int io_timeout_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
int io_link_timeout_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
--
2.37.2
next prev parent reply other threads:[~2022-09-08 15:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 15:56 [PATCH for-next 0/6] defer tw fixes and other cleanups Pavel Begunkov
2022-09-08 15:56 ` [PATCH 1/6] io_uring: further limit non-owner defer-tw cq waiting Pavel Begunkov
2022-09-08 16:39 ` Dylan Yudaken
2022-09-08 15:56 ` [PATCH 2/6] io_uring: disallow defer-tw run w/ no submitters Pavel Begunkov
2022-09-08 16:43 ` Dylan Yudaken
2022-09-08 15:56 ` [PATCH 3/6] io_uring/iopoll: fix unexpected returns Pavel Begunkov
2022-09-08 16:43 ` Dylan Yudaken
2022-09-08 15:56 ` [PATCH 4/6] io_uring/iopoll: unify tw breaking logic Pavel Begunkov
2022-09-08 15:56 ` [PATCH 5/6] io_uring: add fast path for io_run_local_work() Pavel Begunkov
2022-09-08 16:44 ` Dylan Yudaken
2022-09-08 15:56 ` Pavel Begunkov [this message]
2022-09-08 21:23 ` [PATCH for-next 0/6] defer tw fixes and other cleanups Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9a441c9a32a58bcc586076fa9a7d0dc33f1fb3cb.1662652536.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox