diff options
author | Dylan Yudaken <dylany@fb.com> | 2022-08-30 05:50:07 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-09-21 10:30:42 -0600 |
commit | 32d91f0590080597d5fc46c0c36d8885c241622e (patch) | |
tree | 4c4e2ae5f39ce640e261ed657e586c7bd4fe855a | |
parent | 9f0deaa12d832f488500a5afe9b912e9b3cfc432 (diff) |
io_uring: remove unnecessary variable
'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>
-rw-r--r-- | io_uring/io_uring.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index b9640ad5069f..b328805d103a 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -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) |