summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-12-19 10:19:23 -0700
committerJens Axboe <axboe@kernel.dk>2019-12-19 10:19:23 -0700
commit7349b71c2e2a26269d0816cf80f1abda9d80021c (patch)
treea7c30c15fb260eb8f5cc172d45efbb3830763314
parentc39a05819be8ff3863ae552e4ba0e0aff1f7aaaa (diff)
parentbf3aeb3dbbd7f41369ebcceb887cc081ffff7b75 (diff)
downloadliburing-7349b71c2e2a26269d0816cf80f1abda9d80021c.tar.gz
liburing-7349b71c2e2a26269d0816cf80f1abda9d80021c.tar.bz2
Merge branch 'poll-getevents' of https://github.com/glommer/liburing
* 'poll-getevents' of https://github.com/glommer/liburing: for polled IO, do not miss the opportunity of getting completions when going to the kernel
-rw-r--r--src/queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/queue.c b/src/queue.c
index d7bba45..ef2cc2b 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -191,7 +191,7 @@ static int __io_uring_submit(struct io_uring *ring, unsigned submitted,
flags = 0;
if (sq_ring_needs_enter(ring, &flags) || wait_nr) {
- if (wait_nr)
+ if (wait_nr || (ring->flags & IORING_SETUP_IOPOLL))
flags |= IORING_ENTER_GETEVENTS;
ret = __sys_io_uring_enter(ring->ring_fd, submitted, wait_nr,