From 5eae8619907a1389dbd1b4a1049caf52782c0916 Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Fri, 28 Feb 2020 10:36:38 +0300 Subject: 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 Signed-off-by: Jens Axboe --- fs/io-wq.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'fs/io-wq.c') diff --git a/fs/io-wq.c b/fs/io-wq.c index 39ed8751ea31..a1a42ead3b5a 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -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; -- cgit v1.2.3-59-g8ed1b