Use KMEM_CACHE macro to create the nsproxy cache
authorPavel Emelyanov <xemul@openvz.org>
Wed, 17 Oct 2007 06:30:11 +0000 (23:30 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:59 +0000 (08:42 -0700)
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>
kernel/nsproxy.c

index f1decd21a534c248054bef7c1c6f9f6ec7da072c..049e7c0ac5668964cb08554aee935ee687642852 100644 (file)
@@ -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;
 }