Skip to content

Commit

Permalink
io_uring: simplify io_run_task_work_sig return
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
isilence authored and axboe committed Aug 11, 2023
1 parent 19a63c4 commit d246c75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io_uring/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -2477,10 +2477,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;
Expand Down

0 comments on commit d246c75

Please sign in to comment.