summaryrefslogtreecommitdiff
path: root/io_uring/rsrc.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-10-26 06:43:44 -0600
committerJens Axboe <axboe@kernel.dk>2024-11-02 15:44:30 -0600
commitfbbb8e991d86bb7539de6161746b6c747f93f533 (patch)
tree6c2be719ea21b21c4251c65c0003ee57e190dba7 /io_uring/rsrc.c
parent7029acd8a950393ee3a3d8e1a7ee1a9b77808a3b (diff)
io_uring/rsrc: get rid of io_rsrc_node allocation cache
It's not going to be needed in the fast path going forward, so kill it off. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.c')
-rw-r--r--io_uring/rsrc.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 88d698efd75b..8f8147dd714c 100644
--- a/io_uring/rsrc.c
+++ b/io_uring/rsrc.c
@@ -13,7 +13,6 @@
#include <uapi/linux/io_uring.h>
#include "io_uring.h"
-#include "alloc_cache.h"
#include "openclose.h"
#include "rsrc.h"
#include "memmap.h"
@@ -129,16 +128,12 @@ struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx, int type)
{
struct io_rsrc_node *node;
- node = io_alloc_cache_get(&ctx->rsrc_node_cache);
- if (!node) {
- node = kzalloc(sizeof(*node), GFP_KERNEL);
- if (!node)
- return NULL;
+ node = kzalloc(sizeof(*node), GFP_KERNEL);
+ if (node) {
+ node->ctx = ctx;
+ node->refs = 1;
+ node->type = type;
}
-
- node->ctx = ctx;
- node->refs = 1;
- node->type = type;
return node;
}
@@ -487,8 +482,7 @@ void io_free_rsrc_node(struct io_rsrc_node *node)
break;
}
- if (!io_alloc_cache_put(&ctx->rsrc_node_cache, node))
- kfree(node);
+ kfree(node);
}
static void __io_sqe_files_unregister(struct io_ring_ctx *ctx)