io_uring: introduce io_cache_free() helper
Add a helper function io_cache_free() that returns an allocation to a io_alloc_cache, falling back on kfree() if the io_alloc_cache is full. This is the inverse of io_cache_alloc(), which takes an allocation from an io_alloc_cache and falls back on kmalloc() if the cache is empty. Convert 4 callers to use the helper. Signed-off-by:Caleb Sander Mateos <csander@purestorage.com> Suggested-by:
Li Zetao <lizetao1@huawei.com> Link: https://lore.kernel.org/r/20250304194814.2346705-1-csander@purestorage.com Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Loading
Please register or sign in to comment