From d1e751dac2acb9d0600d4c9cb73a534af9aec18f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 28 Jul 2020 17:27:25 +0200 Subject: [PATCH] Revert "fix up queue-4.19/mm-memcg-slab-fix-memory-leak-at-non-root-kmem_cache-destroy.patch" This reverts commit da91bd22b6f50ff1689ed6a1b17f2d71d4abfc2a. --- ...ory-leak-at-non-root-kmem_cache-destroy.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/queue-4.19/mm-memcg-slab-fix-memory-leak-at-non-root-kmem_cache-destroy.patch b/queue-4.19/mm-memcg-slab-fix-memory-leak-at-non-root-kmem_cache-destroy.patch index d9fb93d0634..9e3c35aaae6 100644 --- a/queue-4.19/mm-memcg-slab-fix-memory-leak-at-non-root-kmem_cache-destroy.patch +++ b/queue-4.19/mm-memcg-slab-fix-memory-leak-at-non-root-kmem_cache-destroy.patch @@ -43,8 +43,8 @@ Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- - 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 @@ -63,16 +63,16 @@ Signed-off-by: Greg Kroah-Hartman 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) @@ -80,7 +80,7 @@ Signed-off-by: Greg Kroah-Hartman /* * 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; } @@ -91,7 +91,7 @@ Signed-off-by: Greg Kroah-Hartman #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; @@ -100,7 +100,7 @@ Signed-off-by: Greg Kroah-Hartman 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; -- 2.47.3