Commit de968c18 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: inline __io_queue_linked_timeout()

Inline __io_queue_linked_timeout(), we don't need it
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 96670657
...@@ -1028,7 +1028,6 @@ static void io_dismantle_req(struct io_kiocb *req); ...@@ -1028,7 +1028,6 @@ static void io_dismantle_req(struct io_kiocb *req);
static void io_put_task(struct task_struct *task, int nr); static void io_put_task(struct task_struct *task, int nr);
static void io_queue_next(struct io_kiocb *req); static void io_queue_next(struct io_kiocb *req);
static struct io_kiocb *io_prep_linked_timeout(struct io_kiocb *req); static struct io_kiocb *io_prep_linked_timeout(struct io_kiocb *req);
static void __io_queue_linked_timeout(struct io_kiocb *req);
static void io_queue_linked_timeout(struct io_kiocb *req); static void io_queue_linked_timeout(struct io_kiocb *req);
static int __io_sqe_files_update(struct io_ring_ctx *ctx, static int __io_sqe_files_update(struct io_ring_ctx *ctx,
struct io_uring_rsrc_update *ip, struct io_uring_rsrc_update *ip,
...@@ -6285,8 +6284,11 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer) ...@@ -6285,8 +6284,11 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
return HRTIMER_NORESTART; return HRTIMER_NORESTART;
} }
static void __io_queue_linked_timeout(struct io_kiocb *req) static void io_queue_linked_timeout(struct io_kiocb *req)
{ {
struct io_ring_ctx *ctx = req->ctx;
spin_lock_irq(&ctx->completion_lock);
/* /*
* If the back reference is NULL, then our linked request finished * If the back reference is NULL, then our linked request finished
* before we got a chance to setup the timer * before we got a chance to setup the timer
...@@ -6298,16 +6300,7 @@ static void __io_queue_linked_timeout(struct io_kiocb *req) ...@@ -6298,16 +6300,7 @@ static void __io_queue_linked_timeout(struct io_kiocb *req)
hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), hrtimer_start(&data->timer, timespec64_to_ktime(data->ts),
data->mode); data->mode);
} }
}
static void io_queue_linked_timeout(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
spin_lock_irq(&ctx->completion_lock);
__io_queue_linked_timeout(req);
spin_unlock_irq(&ctx->completion_lock); spin_unlock_irq(&ctx->completion_lock);
/* drop submission reference */ /* drop submission reference */
io_put_req(req); io_put_req(req);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment