Skip to content

Commit db8906d

Browse files
xemulLinus Torvalds
authored andcommitted
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 <xemul@openvz.org> Acked-by: Cedric Le Goater <clg@fr.ibm.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1efd24f commit db8906d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎kernel/nsproxy.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ int unshare_nsproxy_namespaces(unsigned long unshare_flags,
203203

204204
static int __init nsproxy_cache_init(void)
205205
{
206-
nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy),
207-
0, SLAB_PANIC, NULL);
206+
nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC);
208207
return 0;
209208
}
210209

0 commit comments

Comments
 (0)