From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 2/2] io_uring: simplify io_run_task_work_sig return
Date: Wed, 9 Aug 2023 13:25:27 +0100 [thread overview]
Message-ID: <cc882a706b7e3c221261fb387826ecec09033e21.1691546329.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Nobody cares about io_run_task_work_sig returning 1, we only check for
negative errors. Simplify by keeping to 0/-error returns.
Signed-off-by: Pavel Begunkov <[email protected]>
---
io_uring/io_uring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 3c97401240c2..aa531debeb81 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2485,10 +2485,10 @@ int io_run_task_work_sig(struct io_ring_ctx *ctx)
if (!llist_empty(&ctx->work_llist)) {
__set_current_state(TASK_RUNNING);
if (io_run_local_work(ctx) > 0)
- return 1;
+ return 0;
}
if (io_run_task_work() > 0)
- return 1;
+ return 0;
if (task_sigpending(current))
return -EINTR;
return 0;
--
2.41.0
prev parent reply other threads:[~2023-08-09 12:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 12:25 [PATCH 0/2] random for-next cleanups Pavel Begunkov
2023-08-09 12:25 ` [PATCH 1/2] io_uring/rsrc: keep one global dummy_ubuf Pavel Begunkov
2023-08-09 15:05 ` Pavel Begunkov
2023-08-09 12:25 ` Pavel Begunkov [this message]
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=cc882a706b7e3c221261fb387826ecec09033e21.1691546329.git.asml.silence@gmail.com \
[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