Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/msg_ring: Drop custom destructor

kfree can handle slab objects nowadays. Drop the extra callback and just
use kfree.

Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20241216204615.759089-10-krisman@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Gabriel Krisman Bertazi and committed by
Jens Axboe
ce946408 ef623a64

+2 -10
+2 -2
io_uring/io_uring.c
··· 361 361 io_alloc_cache_free(&ctx->netmsg_cache, io_netmsg_cache_free); 362 362 io_alloc_cache_free(&ctx->rw_cache, io_rw_cache_free); 363 363 io_alloc_cache_free(&ctx->uring_cache, kfree); 364 - io_alloc_cache_free(&ctx->msg_cache, io_msg_cache_free); 364 + io_alloc_cache_free(&ctx->msg_cache, kfree); 365 365 io_futex_cache_free(ctx); 366 366 kvfree(ctx->cancel_table.hbs); 367 367 xa_destroy(&ctx->io_bl_xa); ··· 2696 2696 io_alloc_cache_free(&ctx->netmsg_cache, io_netmsg_cache_free); 2697 2697 io_alloc_cache_free(&ctx->rw_cache, io_rw_cache_free); 2698 2698 io_alloc_cache_free(&ctx->uring_cache, kfree); 2699 - io_alloc_cache_free(&ctx->msg_cache, io_msg_cache_free); 2699 + io_alloc_cache_free(&ctx->msg_cache, kfree); 2700 2700 io_futex_cache_free(ctx); 2701 2701 io_destroy_buffers(ctx); 2702 2702 io_free_region(ctx, &ctx->param_region);
-7
io_uring/msg_ring.c
··· 354 354 return __io_msg_ring_data(fd_file(f)->private_data, 355 355 &io_msg, IO_URING_F_UNLOCKED); 356 356 } 357 - 358 - void io_msg_cache_free(const void *entry) 359 - { 360 - struct io_kiocb *req = (struct io_kiocb *) entry; 361 - 362 - kmem_cache_free(req_cachep, req); 363 - }
-1
io_uring/msg_ring.h
··· 4 4 int io_msg_ring_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); 5 5 int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags); 6 6 void io_msg_ring_cleanup(struct io_kiocb *req); 7 - void io_msg_cache_free(const void *entry);