Skip to content

Commit

Permalink
io_uring: remove unnecessary variable
Browse files Browse the repository at this point in the history
'running' is set once and read once, so can easily just remove it

Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220830125013.570060-2-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Dylan Yudaken authored and Jens Axboe committed Sep 21, 2022
1 parent 9f0deaa commit 32d91f0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions io_uring/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,12 +1052,9 @@ void io_req_task_work_add(struct io_kiocb *req)
struct io_uring_task *tctx = req->task->io_uring;
struct io_ring_ctx *ctx = req->ctx;
struct llist_node *node;
bool running;

running = !llist_add(&req->io_task_work.node, &tctx->task_list);

/* task_work already pending, we're done */
if (running)
if (!llist_add(&req->io_task_work.node, &tctx->task_list))
return;

if (ctx->flags & IORING_SETUP_TASKRUN_FLAG)
Expand Down

0 comments on commit 32d91f0

Please sign in to comment.