Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
[cascardo/linux.git] / mm / slub.c
index d9aadbf..3e8afcc 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4466,7 +4466,7 @@ SLAB_ATTR_RO(ctor);
 
 static ssize_t aliases_show(struct kmem_cache *s, char *buf)
 {
-       return sprintf(buf, "%d\n", s->refcount - 1);
+       return sprintf(buf, "%d\n", s->refcount < 0 ? 0 : s->refcount - 1);
 }
 SLAB_ATTR_RO(aliases);
 
@@ -5128,12 +5128,6 @@ static char *create_unique_id(struct kmem_cache *s)
                *p++ = '-';
        p += sprintf(p, "%07d", s->size);
 
-#ifdef CONFIG_MEMCG_KMEM
-       if (!is_root_cache(s))
-               p += sprintf(p, "-%08d",
-                               memcg_cache_id(s->memcg_params->memcg));
-#endif
-
        BUG_ON(p > name + ID_STR_LENGTH - 1);
        return name;
 }