Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
[cascardo/linux.git] / mm / slub.c
index 1f1f838..3e8afcc 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -381,9 +381,9 @@ static inline bool __cmpxchg_double_slab(struct kmem_cache *s, struct page *page
     defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE)
        if (s->flags & __CMPXCHG_DOUBLE) {
                if (cmpxchg_double(&page->freelist, &page->counters,
-                       freelist_old, counters_old,
-                       freelist_new, counters_new))
-               return 1;
+                                  freelist_old, counters_old,
+                                  freelist_new, counters_new))
+                       return 1;
        } else
 #endif
        {
@@ -417,9 +417,9 @@ static inline bool cmpxchg_double_slab(struct kmem_cache *s, struct page *page,
     defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE)
        if (s->flags & __CMPXCHG_DOUBLE) {
                if (cmpxchg_double(&page->freelist, &page->counters,
-                       freelist_old, counters_old,
-                       freelist_new, counters_new))
-               return 1;
+                                  freelist_old, counters_old,
+                                  freelist_new, counters_new))
+                       return 1;
        } else
 #endif
        {
@@ -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;
 }