From: Hao Xu <howeyxu@xxxxxxxxxxx> Release the uringlet worker pool when a ring exits, and reclaim the resource. Signed-off-by: Hao Xu <howeyxu@xxxxxxxxxxx> --- io_uring/io_uring.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index a109dcb48702..bbe8948f4771 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -2699,6 +2699,11 @@ static __cold void io_ring_ctx_wait_and_kill(struct io_ring_ctx *ctx) unsigned long index; struct creds *creds; + if (ctx->flags & IORING_SETUP_URINGLET) { + io_wq_exit_start(ctx->let); + io_wq_put_and_exit(ctx->let); + } + mutex_lock(&ctx->uring_lock); percpu_ref_kill(&ctx->refs); if (ctx->rings) -- 2.25.1