io_uring: cleanup up cancel SQPOLL reqs across exec
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 7 Feb 2021 22:34:26 +0000 (22:34 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 8 Feb 2021 15:27:25 +0000 (08:27 -0700)
commit0e9ddb39b7d964d716cddd6e6bd1aab3f800066e
tree1ef233d1a78b53a893ce7c1c1358481bbacc6db4
parent257e84a5377fbbc336ff563833a8712619acce56
io_uring: cleanup up cancel SQPOLL reqs across exec

For SQPOLL rings tctx_inflight() always returns zero, so it might skip
doing full cancelation. It's fine because we jam all sqpoll submissions
in any case and do go through files cancel for them, but not nice.

Do the intended full cancellation, by mimicking __io_uring_task_cancel()
waiting but impersonating SQPOLL task.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c