]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
io_uring/rsrc: free io_rsrc_node using kfree()
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 28 Feb 2025 23:59:11 +0000 (16:59 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Mar 2025 14:17:15 +0000 (07:17 -0700)
io_rsrc_node_alloc() calls io_cache_alloc(), which uses kmalloc() to
allocate the node. So it can be freed with kfree() instead of kvfree().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250228235916.670437-2-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c

index c8d7284f20b8c53674f970e650ad1ed336b876d3..19e9de040a2006c492997b18c2866a4aa77ce169 100644 (file)
@@ -490,7 +490,7 @@ int io_files_update(struct io_kiocb *req, unsigned int issue_flags)
 static void io_free_node(struct io_ring_ctx *ctx, struct io_rsrc_node *node)
 {
        if (!io_alloc_cache_put(&ctx->node_cache, node))
-               kvfree(node);
+               kfree(node);
 }
 
 void io_free_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node *node)