summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/io_uring.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 863420e184cf..81096f3b01ea 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -9044,6 +9044,8 @@ static void io_uring_cancel_sqpoll(struct io_sq_data *sqd)
s64 inflight;
DEFINE_WAIT(wait);
+ if (!current->io_uring)
+ return;
WARN_ON_ONCE(!sqd || sqd->thread != current);
atomic_inc(&tctx->in_idle);