Revert "io_uring/sqpoll: close race on waiting for sqring entries"
This reverts commit a00eccba07
.
This commit is contained in:
parent
9bf31e8691
commit
05db595c67
1 changed files with 1 additions and 8 deletions
|
@ -1607,14 +1607,7 @@ static inline bool io_sqring_full(struct io_ring_ctx *ctx)
|
|||
{
|
||||
struct io_rings *r = ctx->rings;
|
||||
|
||||
/*
|
||||
* SQPOLL must use the actual sqring head, as using the cached_sq_head
|
||||
* is race prone if the SQPOLL thread has grabbed entries but not yet
|
||||
* committed them to the ring. For !SQPOLL, this doesn't matter, but
|
||||
* since this helper is just used for SQPOLL sqring waits (or POLLOUT),
|
||||
* just read the actual sqring head unconditionally.
|
||||
*/
|
||||
return READ_ONCE(r->sq.tail) - READ_ONCE(r->sq.head) == ctx->sq_entries;
|
||||
return READ_ONCE(r->sq.tail) - ctx->cached_sq_head == ctx->sq_entries;
|
||||
}
|
||||
|
||||
static inline unsigned int __io_cqring_events(struct io_ring_ctx *ctx)
|
||||
|
|
Loading…
Reference in a new issue