Skip to content

Commit d246c75

Browse files
isilenceaxboe
authored andcommitted
io_uring: simplify io_run_task_work_sig return
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]> Link: https://lore.kernel.org/r/3aec8a532c003d6e50739b969a82989402696170.1691757663.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 19a63c4 commit d246c75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

io_uring/io_uring.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,10 +2477,10 @@ int io_run_task_work_sig(struct io_ring_ctx *ctx)
24772477
if (!llist_empty(&ctx->work_llist)) {
24782478
__set_current_state(TASK_RUNNING);
24792479
if (io_run_local_work(ctx) > 0)
2480-
return 1;
2480+
return 0;
24812481
}
24822482
if (io_run_task_work() > 0)
2483-
return 1;
2483+
return 0;
24842484
if (task_sigpending(current))
24852485
return -EINTR;
24862486
return 0;

0 commit comments

Comments
 (0)