slob: handle SLAB_PANIC flag
Subsystems (2)
PATCH 1/1 slob: handle SLAB_PANIC flag
kmem_cache_create() for slob doesn't handle SLAB_PANIC.
--- mm/slob.c | 3 +++ 1 file changed, 3 insertions(+)
mm/slob.c +3 -0
@@ -298,6 +298,9 @@ struct kmem_cache *kmem_cache_create(con c->align = (flags &SLAB_MUST_HWCACHE_ALIGN ) ?SLOB_ALIGN :0 ;if (c->align < align) c->align = align; + }else { +if (flags &SLAB_PANIC ) +panic ("Cannot create slab cache %s\n" , name); }return c;
Quoted 14 lines · Akinobu Mita
kmem_cache_create()for slob doesn't handleSLAB_PANIC.Cc Matt Mackall <[email protected]>Signed-off-by Akinobu Mita <[email protected]>--- mm/slob.c | 3 +++ 1 file changed, 3 insertions(+)Index:
2.6-mm/mm/slob.c
===================================================================
mm/slob.c struct kmem_cache *kmem_cache_create(con · line 304
Quoted 7 lines
mm/slob.c +3
-0@@ -298,6 +298,9 @@ struct kmem_cache *kmem_cache_create(con c->align = (flags &SLAB_MUST_HWCACHE_ALIGN ) ?SLOB_ALIGN :0 ;if (c->align < align) c->align = align; + }else { +if (flags &SLAB_PANIC ) +panic ("Cannot create slab cache %s\n" , name); }
I think this would be more canonical:
} else if (..)
panic();
But otherwise,
Signature · 1 line
Mathematics is the supreme nostalgia of our time.
2007/4/9, Matt Mackall <[email protected]>:
Quoted 15 lines
mm/slob.c struct kmem_cache *kmem_cache_create(con · line 304
Quoted 12 lines
Index:
2.6-mm/mm/slob.c
===================================================================mm/slob.c +3
-0@@ -298,6 +298,9 @@ struct kmem_cache *kmem_cache_create(con c->align = (flags &SLAB_MUST_HWCACHE_ALIGN ) ?SLOB_ALIGN :0 ;if (c->align < align) c->align = align; + }else { +if (flags &SLAB_PANIC ) +panic ("Cannot create slab cache %s\n" , name); }I think this would be more canonical:
Quoted 2 lines
} else if (..)
panic();
Thanks, the patch updated.
From: Akinobu Mita <[email protected]>
Subject: [PATCH] slob: handle SLAB_PANIC flag
kmem_cache_create() for slob doesn't handle SLAB_PANIC.
---mm/slob.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
mm/slob.c +0 -0
@@ -298,7 +298,8 @@ struct kmem_cache *kmem_cache_create(con
c->align = (flags & SLAB_MUST_HWCACHE_ALIGN) ? SLOB_ALIGN : 0; if (c->align < align) c->align = align;
- }
+ } else if (flags & SLAB_PANIC)
+ panic("Cannot create slab cache %s\n", name);
return c; }