]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: cancel work if task_work_add() fails
authorJens Axboe <axboe@kernel.dk>
Mon, 18 May 2020 17:04:17 +0000 (11:04 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 May 2020 17:14:22 +0000 (11:14 -0600)
commit8a80eddcec0f7b6e1bc7ca7945cdeae9d35f31b4
tree790ecb72a74a5148aaeb551d099df7cd325ed2f5
parentc28e6283e0eb137c200be6c292401eeb65ebfa33
io_uring: cancel work if task_work_add() fails

We currently move it to the io_wqe_manager for execution, but we cannot
safely do so as we may lack some of the state to execute it out of
context. As we cancel work anyway when the ring/task exits, just mark
this request as canceled and io_async_task_func() will do the right
thing.

Fixes: 0be7ca8b9b47 ("io_uring: use io-wq manager as backup task if task is exiting")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c