diff mbox series

[2/7] io_uring: specify freeptr usage for SLAB_TYPESAFE_BY_RCU io_kiocb cache

Message ID 20241026222348.90331-3-axboe@kernel.dk (mailing list archive)
State New
Headers show
Series Rewrite rsrc node handling | expand

Commit Message

Jens Axboe Oct. 26, 2024, 10:08 p.m. UTC
Doesn't matter right now as there's still some bytes left for it, but
let's prepare for the io_kiocb potentially growing and add a specific
freeptr offset for it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 io_uring/io_uring.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 140cd47fbdb3..187d4a6b8337 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -3785,6 +3785,8 @@  static int __init io_uring_init(void)
 	struct kmem_cache_args kmem_args = {
 		.useroffset = offsetof(struct io_kiocb, cmd.data),
 		.usersize = sizeof_field(struct io_kiocb, cmd.data),
+		.freeptr_offset = offsetof(struct io_kiocb, work),
+		.use_freeptr_offset = true,
 	};
 
 #define __BUILD_BUG_VERIFY_OFFSET_SIZE(stype, eoffset, esize, ename) do { \