]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/timeout: use 'ctx' consistently
authorYang Xiuwei <yangxiuwei@kylinos.cn>
Thu, 2 Apr 2026 01:49:52 +0000 (09:49 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 Apr 2026 13:08:40 +0000 (07:08 -0600)
There's already a local ctx variable, yet cq_timeouts accounting uses
req->ctx. Use ctx consistently.

Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
Link: https://patch.msgid.link/20260402014952.260414-1-yangxiuwei@kylinos.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/timeout.c

index 579fdddac71aed31dc9348285503c02b849917f6..4cfdfc519770ab894cba7438c40a58e76ce5c10b 100644 (file)
@@ -284,8 +284,8 @@ static enum hrtimer_restart io_timeout_fn(struct hrtimer *timer)
 
        raw_spin_lock_irqsave(&ctx->timeout_lock, flags);
        list_del_init(&timeout->list);
-       atomic_set(&req->ctx->cq_timeouts,
-               atomic_read(&req->ctx->cq_timeouts) + 1);
+       atomic_set(&ctx->cq_timeouts,
+               atomic_read(&ctx->cq_timeouts) + 1);
        raw_spin_unlock_irqrestore(&ctx->timeout_lock, flags);
 
        if (!(data->flags & IORING_TIMEOUT_ETIME_SUCCESS))