lkml.org 
[lkml]   [2009]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] slqb: remove unnecessary conditional in kmem_cache_create
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 <npiggin@suse.de>
Signed-off-by: David Rientjes <rientjes@google.com>
---
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);

\
 
 \ /
  Last update: 2009-09-30 06:45    [W:0.031 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site