projects/linux·commit db8906da

Use KMEM_CACHE macro to create the nsproxy cache

db8906da · Pavel Emelyanov <[email protected]> · 2007-10-16 23:30:11 -07:00

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]>
Acked-by: Cedric Le Goater <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
db8906da596708865a2ead6a8c2af090255ca549
Parents
1efd24fa

Changes

1 files changed · +1 −2

FileStatusAddDelContent
kernel/nsproxy.cmodified+1−2View file

kernel/nsproxy.c

View file
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index f1decd2..049e7c0 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -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;
}