Message ID | 20220819152738.1111255-15-hao.xu@linux.dev (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | uringlet | expand |
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 67d02dc16ea5..0c14b90b8b47 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1751,8 +1751,12 @@ static inline void io_queue_sqe(struct io_kiocb *req) __must_hold(&req->ctx->uring_lock) { int ret; + unsigned int issue_flags = IO_URING_F_COMPLETE_DEFER; - ret = io_issue_sqe(req, IO_URING_F_NONBLOCK|IO_URING_F_COMPLETE_DEFER); + if (!(req->ctx->flags & IORING_SETUP_URINGLET)) + issue_flags |= IO_URING_F_NONBLOCK; + + ret = io_issue_sqe(req, issue_flags); /* * We async punt it if the file wasn't marked NOWAIT, or if the file