summaryrefslogtreecommitdiff
path: root/fs/io-wq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-04-03 11:26:26 -0600
committerJens Axboe <axboe@kernel.dk>2020-04-03 11:35:57 -0600
commitaa96bf8a9ee33457b7e3ea43e97dfa1e3a15ab20 (patch)
treea3ba2c7171210464132794274827829d17dd15b4 /fs/io-wq.h
parent3537b6a7c65434d0d2cc0c9862e69be11c367fdc (diff)
io_uring: use io-wq manager as backup task if task is exiting
If the original task is (or has) exited, then the task work will not get queued properly. Allow for using the io-wq manager task to queue this work for execution, and ensure that the io-wq manager notices and runs this work if woken up (or exiting). Reported-by: Dan Melnic <dmm@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.h')
-rw-r--r--fs/io-wq.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io-wq.h b/fs/io-wq.h
index 3ee7356d6be5..5ba12de7572f 100644
--- a/fs/io-wq.h
+++ b/fs/io-wq.h
@@ -136,6 +136,8 @@ typedef bool (work_cancel_fn)(struct io_wq_work *, void *);
enum io_wq_cancel io_wq_cancel_cb(struct io_wq *wq, work_cancel_fn *cancel,
void *data);
+struct task_struct *io_wq_get_task(struct io_wq *wq);
+
#if defined(CONFIG_IO_WQ)
extern void io_wq_worker_sleeping(struct task_struct *);
extern void io_wq_worker_running(struct task_struct *);