X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=mm%2Fslab_common.c;h=1ec3c619ba04b955f0d64f32ae3d432d113488f6;hb=10ffe3dbf7f9c63d6fde3d1fe23b8fd2ae4d7bd1;hp=8e40321da091b66f24f983b266acb344ce41d56c;hpb=0e47c969c65e213421450c31043353ebe3c67e0c;p=linux-2.6-microblaze.git diff --git a/mm/slab_common.c b/mm/slab_common.c index 8e40321da091..1ec3c619ba04 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -233,14 +233,17 @@ out_unlock: mutex_unlock(&slab_mutex); put_online_cpus(); - /* - * There is no point in flooding logs with warnings or especially - * crashing the system if we fail to create a cache for a memcg. In - * this case we will be accounting the memcg allocation to the root - * cgroup until we succeed to create its own cache, but it isn't that - * critical. - */ - if (err && !memcg) { + if (err) { + /* + * There is no point in flooding logs with warnings or + * especially crashing the system if we fail to create a cache + * for a memcg. In this case we will be accounting the memcg + * allocation to the root cgroup until we succeed to create its + * own cache, but it isn't that critical. + */ + if (!memcg) + return NULL; + if (flags & SLAB_PANIC) panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n", name, err);