[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <961aa3350704090925q6e8659c9od3803d6cac35b455@mail.gmail.com>
Date: Tue, 10 Apr 2007 01:25:09 +0900
From: "Akinobu Mita" <akinobu.mita@...il.com>
To: "Matt Mackall" <mpm@...enic.com>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH] slob: handle SLAB_PANIC flag
2007/4/9, Matt Mackall <mpm@...enic.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@...il.com>
Subject: [PATCH] slob: handle SLAB_PANIC flag
kmem_cache_create() for slob doesn't handle SLAB_PANIC.
Signed-off-by: Matt Mackall <mpm@...enic.com>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists