Use KMEM_CACHE macro to create the nsproxy cache
PATCH 1/1 Use KMEM_CACHE macro to create the nsproxy cache
The blessed way for standard caches is to use it. Besides, this may give this cache a better alignment.
Signed-off-by Pavel Emelyanov <[email protected]>
---
kernel/nsproxy.c +1 -2
@@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_ststatic int __init nsproxy_cache_init (void ) { - nsproxy_cachep =kmem_cache_create ("nsproxy" ,sizeof (struct nsproxy ), -0 ,SLAB_PANIC ,NULL ); + nsproxy_cachep =KMEM_CACHE (nsproxy,SLAB_PANIC );return 0 ; }
Quoted 4 lines · Pavel Emelyanov
The blessed way for standard caches is to use it. Besides, this may give this cache a better alignment.
Signed-off-by Pavel Emelyanov <[email protected]>
yes of course. thanks.
Acked-by Cedric Le Goater <[email protected]>
Quoted 21 lines
---
kernel/nsproxy.c +1
-2@@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_ststatic int __init nsproxy_cache_init (void ) { - nsproxy_cachep =kmem_cache_create ("nsproxy" ,sizeof (struct nsproxy ), -0 ,SLAB_PANIC ,NULL ); + nsproxy_cachep =KMEM_CACHE (nsproxy,SLAB_PANIC );return 0 ; }_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers
Quoted 4 lines · Pavel Emelyanov
The blessed way for standard caches is to use it. Besides, this may give this cache a better alignment.
Signed-off-by Pavel Emelyanov <[email protected]>
Quoted 15 lines
---
kernel/nsproxy.c +1
-2@@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_ststatic int __init nsproxy_cache_init (void ) { - nsproxy_cachep =kmem_cache_create ("nsproxy" ,sizeof (struct nsproxy ), -0 ,SLAB_PANIC ,NULL ); + nsproxy_cachep =KMEM_CACHE (nsproxy,SLAB_PANIC );return 0 ; }