diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-02-05 11:36:43 +0000 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-02-17 05:34:45 -0700 |
| commit | 9afe6847cff78e7f3aa8f4c920265cf298033251 (patch) | |
| tree | 88fba2668a677f324767c17c857576068916ca02 /io_uring/kbuf.c | |
| parent | 7919292a961421bfdb22f83c16657684c96076b3 (diff) | |
| download | linux-9afe6847cff78e7f3aa8f4c920265cf298033251.tar.gz linux-9afe6847cff78e7f3aa8f4c920265cf298033251.tar.bz2 linux-9afe6847cff78e7f3aa8f4c920265cf298033251.zip | |
io_uring/kbuf: remove legacy kbuf kmem cache
Remove the kmem cache used by legacy provided buffers.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/8195c207d8524d94e972c0c82de99282289f7f5c.1738724373.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/kbuf.c')
| -rw-r--r-- | io_uring/kbuf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c index f152afdf0bc7..2e1561c9220f 100644 --- a/io_uring/kbuf.c +++ b/io_uring/kbuf.c @@ -20,8 +20,6 @@ /* BIDs are addressed by a 16-bit field in a CQE */ #define MAX_BIDS_PER_BGID (1 << 16) -struct kmem_cache *io_buf_cachep; - struct io_provide_buf { struct file *file; __u64 addr; @@ -411,7 +409,7 @@ void io_destroy_buffers(struct io_ring_ctx *ctx) list_for_each_safe(item, tmp, &ctx->io_buffers_cache) { buf = list_entry(item, struct io_buffer, list); - kmem_cache_free(io_buf_cachep, buf); + kfree(buf); } } @@ -521,7 +519,7 @@ static int io_refill_buffer_cache(struct io_ring_ctx *ctx) spin_unlock(&ctx->completion_lock); } - buf = kmem_cache_alloc(io_buf_cachep, GFP_KERNEL); + buf = kmalloc(sizeof(*buf), GFP_KERNEL_ACCOUNT); if (!buf) return -ENOMEM; list_add_tail(&buf->list, &ctx->io_buffers_cache); |
