diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-06-30 21:54:03 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-07-01 13:40:17 -0600 |
commit | 9011bf9a13e3b5710c3cfc330da829ee25b5a029 (patch) | |
tree | adf37b6e077ca6e39a75257f4854a257087962d0 /fs/io-wq.h | |
parent | c288d9cd710433e5991d58a0764c4d08a933b871 (diff) | |
download | linux-stable-9011bf9a13e3b5710c3cfc330da829ee25b5a029.tar.gz linux-stable-9011bf9a13e3b5710c3cfc330da829ee25b5a029.tar.bz2 linux-stable-9011bf9a13e3b5710c3cfc330da829ee25b5a029.zip |
io_uring: fix stuck fallback reqs
When task_work_add() fails, we use ->exit_task_work to queue the work.
That will be run only in the cancellation path, which happens either
when the ctx is dying or one of tasks with inflight requests is exiting
or executing. There is a good chance that such a request would just get
stuck in the list potentially hodling a file, all io_uring rsrc
recycling or some other resources. Nothing terrible, it'll go away at
some point, but we don't want to lock them up for longer than needed.
Replace that hand made ->exit_task_work with delayed_work + llist
inspired by fput_many().
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.h')
0 files changed, 0 insertions, 0 deletions