Merge tag 'for-linus-20140507' of git://git.infradead.org/linux-mtd
[firefly-linux-kernel-4.4.55.git] / mm / slab.h
index 8184a7cde272b8aa9d6e08e6407482ca5d7bd7df..6bd4c353704ffd842f29ce9d6adfb3437f829676 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -55,12 +55,12 @@ extern void create_boot_cache(struct kmem_cache *, const char *name,
 struct mem_cgroup;
 #ifdef CONFIG_SLUB
 struct kmem_cache *
-__kmem_cache_alias(struct mem_cgroup *memcg, const char *name, size_t size,
-                  size_t align, unsigned long flags, void (*ctor)(void *));
+__kmem_cache_alias(const char *name, size_t size, size_t align,
+                  unsigned long flags, void (*ctor)(void *));
 #else
 static inline struct kmem_cache *
-__kmem_cache_alias(struct mem_cgroup *memcg, const char *name, size_t size,
-                  size_t align, unsigned long flags, void (*ctor)(void *))
+__kmem_cache_alias(const char *name, size_t size, size_t align,
+                  unsigned long flags, void (*ctor)(void *))
 { return NULL; }
 #endif
 
@@ -91,6 +91,7 @@ __kmem_cache_alias(struct mem_cgroup *memcg, const char *name, size_t size,
 #define CACHE_CREATE_MASK (SLAB_CORE_FLAGS | SLAB_DEBUG_FLAGS | SLAB_CACHE_FLAGS)
 
 int __kmem_cache_shutdown(struct kmem_cache *);
+void slab_kmem_cache_release(struct kmem_cache *);
 
 struct seq_file;
 struct file;
@@ -119,13 +120,6 @@ static inline bool is_root_cache(struct kmem_cache *s)
        return !s->memcg_params || s->memcg_params->is_root_cache;
 }
 
-static inline bool cache_match_memcg(struct kmem_cache *cachep,
-                                    struct mem_cgroup *memcg)
-{
-       return (is_root_cache(cachep) && !memcg) ||
-                               (cachep->memcg_params->memcg == memcg);
-}
-
 static inline void memcg_bind_pages(struct kmem_cache *s, int order)
 {
        if (!is_root_cache(s))
@@ -204,12 +198,6 @@ static inline bool is_root_cache(struct kmem_cache *s)
        return true;
 }
 
-static inline bool cache_match_memcg(struct kmem_cache *cachep,
-                                    struct mem_cgroup *memcg)
-{
-       return true;
-}
-
 static inline void memcg_bind_pages(struct kmem_cache *s, int order)
 {
 }