diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 02339b74ba8d..99ddabb07fbd 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -2868,9 +2868,9 @@ static __cold void io_ring_ctx_free(struct io_ring_ctx *ctx) if (!(ctx->flags & IORING_SETUP_NO_SQARRAY)) static_branch_dec(&io_key_has_sqarray); + io_req_caches_free(ctx); percpu_ref_exit(&ctx->refs); free_uid(ctx->user); - io_req_caches_free(ctx); WARN_ON_ONCE(ctx->nr_req_allocated);