eventfd_signal(ctx->cq_ev_fd, 1);
 }
 
+static void io_cqring_ev_posted_iopoll(struct io_ring_ctx *ctx)
+{
+       if (ctx->flags & IORING_SETUP_SQPOLL) {
+               if (waitqueue_active(&ctx->wait))
+                       wake_up(&ctx->wait);
+       }
+       if (io_should_trigger_evfd(ctx))
+               eventfd_signal(ctx->cq_ev_fd, 1);
+}
+
 /* Returns true if there are no backlogged entries after the flush */
 static bool __io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool force,
                                       struct task_struct *tsk,
        }
 
        io_commit_cqring(ctx);
-       if (ctx->flags & IORING_SETUP_SQPOLL)
-               io_cqring_ev_posted(ctx);
+       io_cqring_ev_posted_iopoll(ctx);
        io_req_free_batch_finish(ctx, &rb);
 
        if (!list_empty(&again))