summaryrefslogtreecommitdiff
path: root/io_uring/rw.c
diff options
context:
space:
mode:
Diffstat (limited to 'io_uring/rw.c')
-rw-r--r--io_uring/rw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c
index 70ca88cc1f54..ff3192f603f3 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -1321,6 +1321,12 @@ int io_do_iopoll(struct io_ring_ctx *ctx, bool force_nonspin)
int nr_events = 0;
/*
+ * Store the polling io_ring_ctx so drivers can detect if they're
+ * completing a request in the same ring context that's polling.
+ */
+ iob.poll_ctx = ctx;
+
+ /*
* Only spin for completions if we don't have multiple devices hanging
* off our complete list.
*/