__io_uring_submit: always check sq_ring_needs_enter()

If SQPOLL is used, we must always call sq_ring_needs_enter(). Otherwise
we don't get IORING_ENTER_SQ_WAKEUP set in the flags, and we don't wake
the sq thread.

Fixes: https://github.com/axboe/liburing/issues/24
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Jens Axboe
2019-11-27 17:02:21 -07:00
parent 4cc37def4d
commit d77a67ed5f
+1 -1
View File
@@ -174,7 +174,7 @@ static int __io_uring_submit(struct io_uring *ring, unsigned submitted,
int ret;
flags = 0;
if (wait_nr || sq_ring_needs_enter(ring, &flags)) {
if (sq_ring_needs_enter(ring, &flags) || wait_nr) {
if (wait_nr)
flags |= IORING_ENTER_GETEVENTS;