From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: [PATCH] Use KMEM_CACHE macro to create the nsproxy cache Date: Wed, 26 Sep 2007 17:22:23 +0400 Message-ID: <46FA5D0F.2090604@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Andrew Morton Cc: Linux Containers , Linux Kernel Mailing List List-Id: containers.vger.kernel.org The blessed way for standard caches is to use it. Besides, this may give this cache a better alignment. Signed-off-by: Pavel Emelyanov --- 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; } From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758152AbXIZNaU (ORCPT ); Wed, 26 Sep 2007 09:30:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753518AbXIZNaH (ORCPT ); Wed, 26 Sep 2007 09:30:07 -0400 Received: from sacred.ru ([62.205.161.221]:48499 "EHLO sacred.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753104AbXIZNaG (ORCPT ); Wed, 26 Sep 2007 09:30:06 -0400 Message-ID: <46FA5D0F.2090604@openvz.org> Date: Wed, 26 Sep 2007 17:22:23 +0400 From: Pavel Emelyanov User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Andrew Morton CC: Serge Hallyn , Linux Containers , Linux Kernel Mailing List Subject: [PATCH] Use KMEM_CACHE macro to create the nsproxy cache Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (sacred.ru [62.205.161.221]); Wed, 26 Sep 2007 17:24:45 +0400 (MSD) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org The blessed way for standard caches is to use it. Besides, this may give this cache a better alignment. Signed-off-by: Pavel Emelyanov --- 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; }