diff options
author | Mark Brown <broonie@kernel.org> | 2024-10-07 14:54:21 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-10-07 14:54:21 +0100 |
commit | 344190e0347324d95393c561a4b8c8dfa8cd628b (patch) | |
tree | 20d054b028d30ed361fbaeb20f319482e4a8312f /io_uring/io_uring.c | |
parent | e4926ca0189dac2e780d6d3cca92052376fd7f0e (diff) | |
parent | 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b (diff) |
ASoC: Merge up v6.12
Fixes build issues with the KVM selftests
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r-- | io_uring/io_uring.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index feb61d68dca6..b2736e3491b8 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -321,7 +321,7 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p) sizeof(struct io_kiocb)); ret |= io_futex_cache_init(ctx); if (ret) - goto err; + goto free_ref; init_completion(&ctx->ref_comp); xa_init_flags(&ctx->personalities, XA_FLAGS_ALLOC1); mutex_init(&ctx->uring_lock); @@ -349,6 +349,9 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p) io_napi_init(ctx); return ctx; + +free_ref: + percpu_ref_exit(&ctx->refs); err: io_alloc_cache_free(&ctx->rsrc_node_cache, kfree); io_alloc_cache_free(&ctx->apoll_cache, kfree); @@ -2038,7 +2041,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, req->opcode = opcode = READ_ONCE(sqe->opcode); /* same numerical values with corresponding REQ_F_*, safe to copy */ sqe_flags = READ_ONCE(sqe->flags); - req->flags = (io_req_flags_t) sqe_flags; + req->flags = (__force io_req_flags_t) sqe_flags; req->cqe.user_data = READ_ONCE(sqe->user_data); req->file = NULL; req->rsrc_node = NULL; |