Skip to content

Commit

Permalink
Use KMEM_CACHE macro to create the nsproxy cache
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Emelyanov authored and Linus Torvalds committed Oct 17, 2007
1 parent 1efd24f commit db8906d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/nsproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ int unshare_nsproxy_namespaces(unsigned long unshare_flags,

static 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;
}

Expand Down

0 comments on commit db8906d

Please sign in to comment.