mirror of
https://github.com/openharmony/third_party_liburing.git
synced 2026-07-21 15:15:31 -04:00
Don't cap wait_nr in __io_uring_submit()
wait_nr is capped to the number of submitted sqes which ignores possible items submitted in previous calls. Removing this cap allows us to wait for any number of completions no matter when they were submitted. Signed-off-by: Hrvoje Zeba <zeba.hrvoje@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
+1
-4
@@ -175,11 +175,8 @@ static int __io_uring_submit(struct io_uring *ring, unsigned submitted,
|
||||
|
||||
flags = 0;
|
||||
if (wait_nr || sq_ring_needs_enter(ring, &flags)) {
|
||||
if (wait_nr) {
|
||||
if (wait_nr > submitted)
|
||||
wait_nr = submitted;
|
||||
if (wait_nr)
|
||||
flags |= IORING_ENTER_GETEVENTS;
|
||||
}
|
||||
|
||||
ret = io_uring_enter(ring->ring_fd, submitted, wait_nr, flags,
|
||||
NULL);
|
||||
|
||||
Reference in New Issue
Block a user