Fix flush/submit with internal timeout

The internal timeout handling relies on __io_uring_get_cqe() always
doing a kernel enter, but it doesn't necessarily do that if we already
have an available event pending.

Make __io_uring_flush_sq() just flush the queue, and don't use the
return value for the kernel side. Always just pass in what is pending
in the actual ring, not the size of the internal state we flushed.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 file changed