summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 27a1c813f1e1..739e58ccc982 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4968,8 +4968,10 @@ static bool io_poll_complete(struct io_kiocb *req, __poll_t mask)
}
if (req->poll.events & EPOLLONESHOT)
flags = 0;
- if (!io_cqring_fill_event(ctx, req->user_data, error, flags))
+ if (!io_cqring_fill_event(ctx, req->user_data, error, flags)) {
+ req->poll.events |= EPOLLONESHOT;
flags = 0;
+ }
if (flags & IORING_CQE_F_MORE)
ctx->cq_extra++;