int                     nr_bits;        /* total bits responsible for */
 };
 
+struct pcpuobj_ext {
+#ifdef CONFIG_MEMCG_KMEM
+       struct obj_cgroup       *cgroup;
+#endif
+};
+
+#ifdef CONFIG_MEMCG_KMEM
+#define NEED_PCPUOBJ_EXT
+#endif
+
 struct pcpu_chunk {
 #ifdef CONFIG_PERCPU_STATS
        int                     nr_alloc;       /* # of allocations */
        int                     end_offset;     /* additional area required to
                                                   have the region end page
                                                   aligned */
-#ifdef CONFIG_MEMCG_KMEM
-       struct obj_cgroup       **obj_cgroups;  /* vector of object cgroups */
+#ifdef NEED_PCPUOBJ_EXT
+       struct pcpuobj_ext      *obj_exts;      /* vector of object cgroups */
 #endif
 
        int                     nr_pages;       /* # of pages served by this chunk */
        unsigned long           populated[];    /* populated bitmap */
 };
 
+static inline bool need_pcpuobj_ext(void)
+{
+       return !mem_cgroup_kmem_disabled();
+}
+
 extern spinlock_t pcpu_lock;
 
 extern struct list_head *pcpu_chunk_lists;
 
                panic("%s: Failed to allocate %zu bytes\n", __func__,
                      alloc_size);
 
-#ifdef CONFIG_MEMCG_KMEM
+#ifdef NEED_PCPUOBJ_EXT
        /* first chunk is free to use */
-       chunk->obj_cgroups = NULL;
+       chunk->obj_exts = NULL;
 #endif
        pcpu_init_md_blocks(chunk);
 
        if (!chunk->md_blocks)
                goto md_blocks_fail;
 
-#ifdef CONFIG_MEMCG_KMEM
-       if (!mem_cgroup_kmem_disabled()) {
-               chunk->obj_cgroups =
+#ifdef NEED_PCPUOBJ_EXT
+       if (need_pcpuobj_ext()) {
+               chunk->obj_exts =
                        pcpu_mem_zalloc(pcpu_chunk_map_bits(chunk) *
-                                       sizeof(struct obj_cgroup *), gfp);
-               if (!chunk->obj_cgroups)
+                                       sizeof(struct pcpuobj_ext), gfp);
+               if (!chunk->obj_exts)
                        goto objcg_fail;
        }
 #endif
 
        return chunk;
 
-#ifdef CONFIG_MEMCG_KMEM
+#ifdef NEED_PCPUOBJ_EXT
 objcg_fail:
        pcpu_mem_free(chunk->md_blocks);
 #endif
 {
        if (!chunk)
                return;
-#ifdef CONFIG_MEMCG_KMEM
-       pcpu_mem_free(chunk->obj_cgroups);
+#ifdef NEED_PCPUOBJ_EXT
+       pcpu_mem_free(chunk->obj_exts);
 #endif
        pcpu_mem_free(chunk->md_blocks);
        pcpu_mem_free(chunk->bound_map);
        if (!objcg)
                return;
 
-       if (likely(chunk && chunk->obj_cgroups)) {
+       if (likely(chunk && chunk->obj_exts)) {
                obj_cgroup_get(objcg);
-               chunk->obj_cgroups[off >> PCPU_MIN_ALLOC_SHIFT] = objcg;
+               chunk->obj_exts[off >> PCPU_MIN_ALLOC_SHIFT].cgroup = objcg;
 
                rcu_read_lock();
                mod_memcg_state(obj_cgroup_memcg(objcg), MEMCG_PERCPU_B,
 {
        struct obj_cgroup *objcg;
 
-       if (unlikely(!chunk->obj_cgroups))
+       if (unlikely(!chunk->obj_exts))
                return;
 
-       objcg = chunk->obj_cgroups[off >> PCPU_MIN_ALLOC_SHIFT];
+       objcg = chunk->obj_exts[off >> PCPU_MIN_ALLOC_SHIFT].cgroup;
        if (!objcg)
                return;
-       chunk->obj_cgroups[off >> PCPU_MIN_ALLOC_SHIFT] = NULL;
+       chunk->obj_exts[off >> PCPU_MIN_ALLOC_SHIFT].cgroup = NULL;
 
        obj_cgroup_uncharge(objcg, pcpu_obj_full_size(size));