Don't enter the kernel to wait on cqes if they are already available.

In _io_uring_get_cqe(), if we can see from userspace that there are
already wait_nr cqes available, then there is no need to call
__sys_io_uring_enter2 (unless we have to submit IO or flush overflow),
since the kernel will just end up returning immediately after
performing the same check, anyway.

Signed-off-by: Marcelo Diop-Gonzalez <marcelo827@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 file changed