Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751485AbZI3Ema (ORCPT ); Wed, 30 Sep 2009 00:42:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750985AbZI3Em3 (ORCPT ); Wed, 30 Sep 2009 00:42:29 -0400 Received: from smtp-out.google.com ([216.239.33.17]:61287 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbZI3Em3 (ORCPT ); Wed, 30 Sep 2009 00:42:29 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:from:x-x-sender:to:cc:subject:message-id:user-agent: mime-version:content-type:x-system-of-record; b=f54GmmKb1Cp7hVkbCL3zIcla3mNYz9AxKv9HDrtxeQleypb1xvAt7dNZoxFqyhD1K rZ7NR6UI6C+2lbFcz5FeQ== Date: Tue, 29 Sep 2009 21:42:25 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Pekka Enberg cc: Nick Piggin , linux-kernel@vger.kernel.org Subject: [patch] slqb: remove unnecessary conditional in kmem_cache_create Message-ID: User-Agent: Alpine 1.00 (DEB 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1096 Lines: 32 kmem_cache_open() panics when a SLAB_PANIC cache cannot be opened because it has early callers using the flag that do not go through kmem_cache_create(). If kmem_cache_open() fails for a SLAB_PANIC cache, it would have panicked the machine. Thus, checking for this flag in kmem_cache_create() is unnecessary in the error patch since it is always clear. Cc: Nick Piggin Signed-off-by: David Rientjes --- mm/slqb.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/mm/slqb.c b/mm/slqb.c --- a/mm/slqb.c +++ b/mm/slqb.c @@ -3077,9 +3077,6 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, err: up_write(&slqb_lock); - if (flags & SLAB_PANIC) - panic("%s: failed to create slab `%s'\n", __func__, name); - return NULL; } EXPORT_SYMBOL(kmem_cache_create); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/