io_uring: move timeout locking in io_timeout_cancel()
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 20 Apr 2022 12:40:54 +0000 (13:40 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 Apr 2022 22:29:00 +0000 (16:29 -0600)
commitee9b7ff3029310988a264b7d44c74e4082d2863b
treec2455333bb6994bcb04f8dd28c86204321619879
parent16b217ed7bb386febf922dd18b5f4720ce6f4fa1
io_uring: move timeout locking in io_timeout_cancel()

Move ->timeout_lock grabbing inside of io_timeout_cancel(), so
we can do io_req_task_queue_fail() outside of the lock. It's much nicer
than relying on triple nested locking.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/cde758c2897930d31e205ed8f476d4ec879a8849.1650458197.git.asml.silence@gmail.com
[axboe: drop now wrong timeout_lock annotation]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c