* [PATCH] slob: handle SLAB_PANIC flag
@ 2007-04-09 13:08 Akinobu Mita
2007-04-09 14:57 ` Matt Mackall
0 siblings, 1 reply; 3+ messages in thread
From: Akinobu Mita @ 2007-04-09 13:08 UTC (permalink / raw)
To: linux-kernel; +Cc: Matt Mackall, linux-arch
kmem_cache_create() for slob doesn't handle SLAB_PANIC.
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
mm/slob.c | 3 +++
1 file changed, 3 insertions(+)
Index: 2.6-mm/mm/slob.c
===================================================================
--- 2.6-mm.orig/mm/slob.c
+++ 2.6-mm/mm/slob.c
@@ -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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] slob: handle SLAB_PANIC flag
2007-04-09 13:08 [PATCH] slob: handle SLAB_PANIC flag Akinobu Mita
@ 2007-04-09 14:57 ` Matt Mackall
2007-04-09 16:25 ` Akinobu Mita
0 siblings, 1 reply; 3+ messages in thread
From: Matt Mackall @ 2007-04-09 14:57 UTC (permalink / raw)
To: Akinobu Mita, linux-kernel, linux-arch
On Mon, Apr 09, 2007 at 10:08:47PM +0900, Akinobu Mita wrote:
> kmem_cache_create() for slob doesn't handle SLAB_PANIC.
>
> Cc: Matt Mackall <mpm@selenic.com>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
>
> ---
> mm/slob.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: 2.6-mm/mm/slob.c
> ===================================================================
> --- 2.6-mm.orig/mm/slob.c
> +++ 2.6-mm/mm/slob.c
> @@ -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,
Signed-off-by: Matt Mackall <mpm@selenic.com>
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] slob: handle SLAB_PANIC flag
2007-04-09 14:57 ` Matt Mackall
@ 2007-04-09 16:25 ` Akinobu Mita
0 siblings, 0 replies; 3+ messages in thread
From: Akinobu Mita @ 2007-04-09 16:25 UTC (permalink / raw)
To: Matt Mackall; +Cc: linux-kernel, linux-arch
2007/4/9, Matt Mackall <mpm@selenic.com>:
> > Index: 2.6-mm/mm/slob.c
> > ===================================================================
> > --- 2.6-mm.orig/mm/slob.c
> > +++ 2.6-mm/mm/slob.c
> > @@ -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();
Thanks, the patch updated.
From: Akinobu Mita <akinobu.mita@gmail.com>
Subject: [PATCH] slob: handle SLAB_PANIC flag
kmem_cache_create() for slob doesn't handle SLAB_PANIC.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
mm/slob.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: 2.6-mm/mm/slob.c
===================================================================
--- 2.6-mm.orig/mm/slob.c
+++ 2.6-mm/mm/slob.c
@@ -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;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-09 16:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-09 13:08 [PATCH] slob: handle SLAB_PANIC flag Akinobu Mita
2007-04-09 14:57 ` Matt Mackall
2007-04-09 16:25 ` Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox