All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
@ 2007-09-26 13:22 ` Pavel Emelyanov
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Emelyanov @ 2007-09-26 13:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Containers, Linux Kernel Mailing List

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-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>

---

diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index ee68964..31351cc 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_st
 
 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;
 }

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-26 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 13:22 [PATCH] Use KMEM_CACHE macro to create the nsproxy cache Pavel Emelyanov
2007-09-26 13:22 ` Pavel Emelyanov
2007-09-26 13:37 ` Cedric Le Goater
     [not found] ` <46FA5D0F.2090604-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-09-26 13:39   ` Serge E. Hallyn
2007-09-26 13:39     ` Serge E. Hallyn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.