diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-02-28 10:36:38 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-03 00:06:29 +0300 |
commit | 5eae8619907a1389dbd1b4a1049caf52782c0916 (patch) | |
tree | f6982854a714ebe3778d17a0122c28dbd7c83711 /fs/io_uring.c | |
parent | e85530ddda4f08d4f9ed6506d4a1f42e086e3b21 (diff) | |
download | linux-5eae8619907a1389dbd1b4a1049caf52782c0916.tar.xz |
io_uring: remove IO_WQ_WORK_CB
IO_WQ_WORK_CB is used only for linked timeouts, which will be armed
before the work setup (i.e. mm, override creds, etc). The setup
shouldn't take long, so it's ok to arm it a bit later and get rid
of IO_WQ_WORK_CB.
Make io-wq call work->func() only once, callbacks will handle the rest.
i.e. the linked timeout handler will do the actual issue. And as a
bonus, it removes an extra indirect call.
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 | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 2a8d88c9bcab..f999503854b7 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2549,7 +2549,7 @@ static void io_link_work_cb(struct io_wq_work **workptr) struct io_kiocb *link = work->data; io_queue_linked_timeout(link); - work->func = io_wq_submit_work; + io_wq_submit_work(workptr); } static void io_wq_assign_next(struct io_wq_work **workptr, struct io_kiocb *nxt) @@ -2559,7 +2559,6 @@ static void io_wq_assign_next(struct io_wq_work **workptr, struct io_kiocb *nxt) io_prep_next_work(nxt, &link); *workptr = &nxt->work; if (link) { - nxt->work.flags |= IO_WQ_WORK_CB; nxt->work.func = io_link_work_cb; nxt->work.data = link; } |