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>
这个提交包含在:
Pavel Begunkov
2020-02-28 10:36:38 +03:00
提交者 Jens Axboe
父节点 e85530ddda
当前提交 5eae861990
修改 3 个文件,包含 1 行新增6 行删除

查看文件

@@ -479,9 +479,6 @@ next:
worker->cur_work = work;
spin_unlock_irq(&worker->lock);
if (work->flags & IO_WQ_WORK_CB)
work->func(&work);
if (work->files && current->files != work->files) {
task_lock(current);
current->files = work->files;