Commit be4f5d9c authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/msg_ring: use kmem_cache_free() to free request



The change adding caching around the request allocated and freed for
data messages changed a kmem_cache_free() to a kfree(), which isn't
correct as the request came from slab in the first place. Fix that up
and use the right freeing function if the cache is already at its limit.

Note that the current mixing of kmem_cache_alloc and kfree is fine, but
consistent alloc/free functions should be used as it's otherwise somewhat
confusing.

Fixes: 50cf5f38 ("io_uring/msg_ring: add an alloc cache for io_kiocb entries")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b0727b12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment