]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
slub-optimize-bulk-slowpath-free-by-detached-freelist-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Oct 2015 22:02:51 +0000 (09:02 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:02:51 +0000 (09:02 +1100)
BUG_ON -> WARN_ON;return

Cc: Alexander Duyck <alexander.h.duyck@redhat.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slub.c

index ab4bcdaa88feeb67f8bade337964abcebb19e966..57fe59de6c1ed895b80af729c055cb5706d35c3a 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2885,7 +2885,8 @@ static int build_detached_freelist(struct kmem_cache *s, size_t size,
 /* Note that interrupts must be enabled when calling this function. */
 void kmem_cache_free_bulk(struct kmem_cache *s, size_t size, void **p)
 {
-       BUG_ON(!size);
+       if (WARN_ON(!size))
+               return;
 
        do {
                struct detached_freelist df;