We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dacf472 commit 052d67bCopy full SHA for 052d67b
include/linux/slab.h
@@ -284,9 +284,11 @@ int kmem_cache_shrink(struct kmem_cache *s);
284
* f.e. add ____cacheline_aligned_in_smp to the struct declaration
285
* then the objects will be properly aligned in SMP configurations.
286
*/
287
-#define KMEM_CACHE(__struct, __flags) \
288
- kmem_cache_create(#__struct, sizeof(struct __struct), \
289
- __alignof__(struct __struct), (__flags), NULL)
+#define KMEM_CACHE(__struct, __flags) \
+ __kmem_cache_create_args(#__struct, sizeof(struct __struct), \
+ &(struct kmem_cache_args) { \
290
+ .align = __alignof__(struct __struct), \
291
+ }, (__flags))
292
293
/*
294
* To whitelist a single field for copying to/from usercopy, use this
0 commit comments