io_uring: don't wait when under-submitting
commit7c504e65206a4379ff38fe41d21b32b6c2c3e53e
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 18 Dec 2019 16:53:45 +0000 (18 19:53 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Dec 2019 17:01:49 +0000 (18 10:01 -0700)
tree7badbc25ff49df5c2493cd5516b9dcbdfa8d7b50
parente781573e2fb1b75acdba61dcb9bcbfc16f288442
io_uring: don't wait when under-submitting

There is no reliable way to submit and wait in a single syscall, as
io_submit_sqes() may under-consume sqes (in case of an early error).
Then it will wait for not-yet-submitted requests, deadlocking the user
in most cases.

Don't wait/poll if can't submit all sqes

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