mm: memcg/slab: allocate obj_cgroups for non-root slab pages
[linux-2.6-microblaze.git] / include / linux / slab_def.h
index abc7de7..ccda7b9 100644 (file)
@@ -114,4 +114,10 @@ static inline unsigned int obj_to_index(const struct kmem_cache *cache,
        return reciprocal_divide(offset, cache->reciprocal_buffer_size);
 }
 
+static inline int objs_per_slab_page(const struct kmem_cache *cache,
+                                    const struct page *page)
+{
+       return cache->num;
+}
+
 #endif /* _LINUX_SLAB_DEF_H */