mirror of
https://github.com/openharmony/third_party_liburing.git
synced 2026-07-21 15:15:31 -04:00
Fix io_uring_sq_ready()
This is supposed to return the entries that are actually in the SQ ring, not the liburing copy. This fixes an issue where if you fail to submit IO the first time (eg got -EBUSY), then a subsequent submit would think we had nothing to submit. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -297,7 +297,7 @@ static inline void io_uring_prep_link_timeout(struct io_uring_sqe *sqe,
|
||||
|
||||
static inline unsigned io_uring_sq_ready(struct io_uring *ring)
|
||||
{
|
||||
return ring->sq.sqe_tail - ring->sq.sqe_head;
|
||||
return *ring->sq.ktail - *ring->sq.khead;
|
||||
}
|
||||
|
||||
static inline unsigned io_uring_sq_space_left(struct io_uring *ring)
|
||||
|
||||
Reference in New Issue
Block a user