mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	io_uring: specify freeptr usage for SLAB_TYPESAFE_BY_RCU io_kiocb cache
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>
This commit is contained in:
		
							parent
							
								
									ff1256b8f3
								
							
						
					
					
						commit
						aaa736b186
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -3846,6 +3846,8 @@ static int __init io_uring_init(void)
 | 
				
			||||||
	struct kmem_cache_args kmem_args = {
 | 
						struct kmem_cache_args kmem_args = {
 | 
				
			||||||
		.useroffset = offsetof(struct io_kiocb, cmd.data),
 | 
							.useroffset = offsetof(struct io_kiocb, cmd.data),
 | 
				
			||||||
		.usersize = sizeof_field(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 { \
 | 
					#define __BUILD_BUG_VERIFY_OFFSET_SIZE(stype, eoffset, esize, ename) do { \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue