Skip to content

Commit

Permalink
io_uring: inline __io_queue_async_work()
Browse files Browse the repository at this point in the history
__io_queue_async_work() is only called from io_queue_async_work(),
inline it.

Signed-off-by: Pavel Begunkov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
isilence authored and axboe committed Mar 4, 2021
1 parent f85c310 commit ebf9366
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ static void io_prep_async_link(struct io_kiocb *req)
io_prep_async_work(cur);
}

static struct io_kiocb *__io_queue_async_work(struct io_kiocb *req)
static void io_queue_async_work(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
struct io_kiocb *link = io_prep_linked_timeout(req);
Expand All @@ -1216,18 +1216,9 @@ static struct io_kiocb *__io_queue_async_work(struct io_kiocb *req)

trace_io_uring_queue_async_work(ctx, io_wq_is_hashed(&req->work), req,
&req->work, req->flags);
io_wq_enqueue(tctx->io_wq, &req->work);
return link;
}

static void io_queue_async_work(struct io_kiocb *req)
{
struct io_kiocb *link;

/* init ->work of the whole link before punting */
io_prep_async_link(req);
link = __io_queue_async_work(req);

io_wq_enqueue(tctx->io_wq, &req->work);
if (link)
io_queue_linked_timeout(link);
}
Expand Down

0 comments on commit ebf9366

Please sign in to comment.