@@ -540,14 +540,6 @@ static void __io_queue_proc(struct io_poll *poll, struct io_poll_table *pt,
540
540
poll -> wait .private = (void * ) wqe_private ;
541
541
542
542
if (poll -> events & EPOLLEXCLUSIVE ) {
543
- /*
544
- * Exclusive waits may only wake a limited amount of entries
545
- * rather than all of them, this may interfere with lazy
546
- * wake if someone does wait(events > 1). Ensure we don't do
547
- * lazy wake for those, as we need to process each one as they
548
- * come in.
549
- */
550
- req -> flags |= REQ_F_POLL_NO_LAZY ;
551
543
add_wait_queue_exclusive (head , & poll -> wait );
552
544
} else {
553
545
add_wait_queue (head , & poll -> wait );
@@ -616,6 +608,17 @@ static int __io_arm_poll_handler(struct io_kiocb *req,
616
608
if (issue_flags & IO_URING_F_UNLOCKED )
617
609
req -> flags &= ~REQ_F_HASH_LOCKED ;
618
610
611
+
612
+ /*
613
+ * Exclusive waits may only wake a limited amount of entries
614
+ * rather than all of them, this may interfere with lazy
615
+ * wake if someone does wait(events > 1). Ensure we don't do
616
+ * lazy wake for those, as we need to process each one as they
617
+ * come in.
618
+ */
619
+ if (poll -> events & EPOLLEXCLUSIVE )
620
+ req -> flags |= REQ_F_POLL_NO_LAZY ;
621
+
619
622
mask = vfs_poll (req -> file , & ipt -> pt ) & poll -> events ;
620
623
621
624
if (unlikely (ipt -> error || !ipt -> nr_entries )) {
0 commit comments