diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-03-19 17:22:33 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-11 17:41:58 -0600 |
commit | de968c182b4f48a421b0a3862e747c4147a7da22 (patch) | |
tree | 513e966ec16ee84d952c434362e9ab61ac2ee94a /fs/io_uring.c | |
parent | 966706579a7124fa6334f10c48474193fd6780c0 (diff) | |
download | lwn-de968c182b4f48a421b0a3862e747c4147a7da22.tar.gz lwn-de968c182b4f48a421b0a3862e747c4147a7da22.zip |
io_uring: inline __io_queue_linked_timeout()
Inline __io_queue_linked_timeout(), we don't need it
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 7bbecf45d91c..416afa7af5df 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -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_queue_next(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 int __io_sqe_files_update(struct io_ring_ctx *ctx, struct io_uring_rsrc_update *ip, @@ -6285,8 +6284,11 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer) 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 * before we got a chance to setup the timer @@ -6298,16 +6300,7 @@ static void __io_queue_linked_timeout(struct io_kiocb *req) hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), 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); - /* drop submission reference */ io_put_req(req); } |