io_uring: use correct "is IO worker" helper

Since we switched to io-wq, the dependent link optimization for when to
pass back work inline has been broken. Fix this by providing a suitable
io-wq helper for io_uring to use to detect when to do this.

Fixes: 561fb04a6a ("io_uring: replace workqueue usage with io-wq")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Dieser Commit ist enthalten in:
Jens Axboe
2019-11-12 07:56:39 -07:00
Ursprung 76a46e066e
Commit 960e432dfa
2 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen

Datei anzeigen

@@ -62,4 +62,8 @@ static inline void io_wq_worker_running(struct task_struct *tsk)
}
#endif
static inline bool io_wq_current_is_worker(void)
{
return in_task() && (current->flags & PF_IO_WORKER);
}
#endif