diff mbox series

[2/5] io_uring/rsrc: free io_rsrc_node using kfree()

Message ID 20250228235916.670437-2-csander@purestorage.com (mailing list archive)
State New
Headers show
Series [1/5] io_uring/rsrc: split out io_free_node() helper | expand

Commit Message

Caleb Sander Mateos Feb. 28, 2025, 11:59 p.m. UTC
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>
---
 io_uring/rsrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index d941256f0d8c..748a09cfaeaa 100644
--- a/io_uring/rsrc.c
+++ b/io_uring/rsrc.c
@@ -488,11 +488,11 @@  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)
 {
 	if (node->tag)