io_uring: split work handling part of SQPOLL into helper
authorJens Axboe <axboe@kernel.dk>
Wed, 2 Sep 2020 18:59:31 +0000 (12:59 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 5 Sep 2020 22:07:35 +0000 (16:07 -0600)
commite2a36a81d25cb93b7ce07334bf814f4867d4af25
tree96fabeaf61b75976a091d586244073e76e8821f1
parentb1abe842d31e08d9ebe6b049e4895fdc54d2fe21
io_uring: split work handling part of SQPOLL into helper

This is done in preparation for handling more than one ctx, but it also
cleans up the code a bit since io_sq_thread() was a bit too unwieldy to
get a get overview on.

__io_sq_thread() is now the main handler, and it returns an enum sq_ret
that tells io_sq_thread() what it ended up doing. The parent then makes
a decision on idle, spinning, or work handling based on that.

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