+2
-1
fs/io_uring.c
+2
-1
fs/io_uring.c
···
2576
2576
poll_wait(file, &ctx->cq_wait, wait);
2577
2577
/* See comment at the top of this file */
2578
2578
smp_rmb();
2579
-
if (READ_ONCE(ctx->sq_ring->r.tail) + 1 != ctx->cached_sq_head)
2579
+
if (READ_ONCE(ctx->sq_ring->r.tail) - ctx->cached_sq_head !=
2580
+
ctx->sq_ring->ring_entries)
2580
2581
mask |= EPOLLOUT | EPOLLWRNORM;
2581
2582
if (READ_ONCE(ctx->cq_ring->r.head) != ctx->cached_cq_tail)
2582
2583
mask |= EPOLLIN | EPOLLRDNORM;