Subject: Re: linux-next: Tree for Jul 4

From: Andrew Morton <[email-masked]>
Date: Thu, 4 Jul 2013 01:45:44 -0700

On Thu, 4 Jul 2013 10:21:09 +0200 Sedat Dilek <[email-masked]> wrote:

> I have compared both mm/memcontrol.c files from
> next-20130703/next-20130704 - they are identical.
> 
> These hunks...
> 
> [ From Li Zefan ]
> @@ -6332,8 +6341,7 @@ static void mem_cgroup_css_free(struct cgroup *cont)
>  {
>         struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
> 
> -       mem_cgroup_sockets_destroy(memcg);
> -
> +       memcg_destroy_kmem(memcg);
>         __mem_cgroup_free(memcg);
>  }
> 
> [ From mmots ]
> @@ -6399,8 +6408,7 @@ static void mem_cgroup_css_free(struct c
>  {
>         struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
> 
> -       mem_cgroup_sockets_destroy(memcg);
> -
> +       memcg_destroy_kmem(memcg);
>         mem_cgroup_put(memcg);
>  }
> 
> ...seems to differ.
> 
> In both mentioned -next releases there exist no mem_cgroup_put() in
> mm/memcontrol.c.
> So the hunk in mmots seems to be wrong in my eyes.

Seems right - thanks for catching that.

--- a/mm/memcontrol.c~memcg-use-css_get-put-when-charging-uncharging-kmem-fix-fix-fix
+++ a/mm/memcontrol.c
@@ -6409,7 +6409,7 @@ static void mem_cgroup_css_free(struct c
 	struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
 
 	memcg_destroy_kmem(memcg);
-	mem_cgroup_put(memcg);
+	__mem_cgroup_free(memcg);
 }
 
 #ifdef CONFIG_MMU
_