@@ -7329,6 +7329,8 @@ static int io_poll_remove(struct io_kiocb *req, unsigned int issue_flags)
int ret2, ret = 0;
bool locked;
+ io_ring_submit_lock(ctx, !(issue_flags & IO_URING_F_NONBLOCK));
+
spin_lock(&ctx->completion_lock);
preq = io_poll_find(ctx, true, &cd);
if (!preq || !io_poll_disarm(preq)) {
@@ -7363,6 +7365,7 @@ static int io_poll_remove(struct io_kiocb *req, unsigned int issue_flags)
req_set_fail(req);
/* complete update request, we're done with it */
__io_req_complete(req, issue_flags, ret, 0);
+ io_ring_submit_unlock(ctx, !(issue_flags & IO_URING_F_NONBLOCK));
return 0;
}