io-wq: re-add io_wq_current_is_worker()
This reverts commit 8cdda87a44
, we now have several use csaes for this
helper. Reinstate it.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
alistair/sunxi64-5.5-dsi
parent
0b416c3e13
commit
525b305d61
|
@ -120,6 +120,10 @@ static inline void io_wq_worker_sleeping(struct task_struct *tsk)
|
||||||
static inline void io_wq_worker_running(struct task_struct *tsk)
|
static inline void io_wq_worker_running(struct task_struct *tsk)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IO_WQ */
|
#endif
|
||||||
|
|
||||||
#endif /* INTERNAL_IO_WQ_H */
|
static inline bool io_wq_current_is_worker(void)
|
||||||
|
{
|
||||||
|
return in_task() && (current->flags & PF_IO_WORKER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue