]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: reap poll completions while waiting for refs to drop on exit
authorJens Axboe <axboe@kernel.dk>
Wed, 17 Jun 2020 21:00:04 +0000 (15:00 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 17 Jun 2020 21:05:08 +0000 (15:05 -0600)
commitff7fcb4e4f5cfae00b9c41d3f40e8f6dc2a5e050
tree0e3cbc16f147b9fdd243a296b2d139df000bf2cc
parente849c9384027aca5bf7e49f454f28a6628f16e69
io_uring: reap poll completions while waiting for refs to drop on exit

If we're doing polled IO and end up having requests being submitted
async, then completions can come in while we're waiting for refs to
drop. We need to reap these manually, as nobody else will be looking
for them.

Break the wait into 1/20th of a second time waits, and check for done
poll completions if we time out. Otherwise we can have done poll
completions sitting in ctx->poll_list, which needs us to reap them but
we're just waiting for them.

Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c