Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- mm/slab_common.c | 37 ++++++++++++++++++++++++++++---------
- 1 file changed, 28 insertions(+), 9 deletions(-)
+ mm/slab_common.c | 35 ++++++++++++++++++++++++++++-------
+ 1 file changed, 28 insertions(+), 7 deletions(-)
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
return 0;
}
-@@ -832,12 +840,13 @@ static int shutdown_memcg_caches(struct
+@@ -832,12 +840,15 @@ static int shutdown_memcg_caches(struct
return 0;
}
-static void flush_memcg_workqueue(struct kmem_cache *s)
+static void memcg_set_kmem_cache_dying(struct kmem_cache *s)
{
-- mutex_lock(&slab_mutex);
+ mutex_lock(&slab_mutex);
s->memcg_params.dying = true;
-- mutex_unlock(&slab_mutex);
+ mutex_unlock(&slab_mutex);
+}
+static void flush_memcg_workqueue(struct kmem_cache *s)
/*
* SLUB deactivates the kmem_caches through call_rcu_sched. Make
* sure all registered rcu callbacks have been invoked.
-@@ -858,10 +867,6 @@ static inline int shutdown_memcg_caches(
+@@ -858,10 +869,6 @@ static inline int shutdown_memcg_caches(
{
return 0;
}
#endif /* CONFIG_MEMCG_KMEM */
void slab_kmem_cache_release(struct kmem_cache *s)
-@@ -879,8 +884,6 @@ void kmem_cache_destroy(struct kmem_cach
+@@ -879,8 +886,6 @@ void kmem_cache_destroy(struct kmem_cach
if (unlikely(!s))
return;
get_online_cpus();
get_online_mems();
-@@ -890,6 +893,22 @@ void kmem_cache_destroy(struct kmem_cach
+@@ -890,6 +895,22 @@ void kmem_cache_destroy(struct kmem_cach
if (s->refcount)
goto out_unlock;