From dccfe9526bde3e8140b3b97d7fc457e62dbcc75b Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Wed, 1 Apr 2015 13:58:39 +0530 Subject: [PATCH] cgroup: memcg: pass correct argument to subsys_cgroup_allow_attach MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Pass correct argument to subsys_cgroup_allow_attach(), which expects 'struct cgroup_subsys_state *' argument but we pass 'struct cgroup *' instead which doesn't seem right. This fixes following 'incompatible pointer type' compiler warning: ---------- CC mm/memcontrol.o mm/memcontrol.c: In function ‘mem_cgroup_allow_attach’: mm/memcontrol.c:5052:2: warning: passing argument 1 of ‘subsys_cgroup_allow_attach’ from incompatible pointer type [enabled by default] In file included from include/linux/memcontrol.h:22:0, from mm/memcontrol.c:29: include/linux/cgroup.h:953:5: note: expected ‘struct cgroup_subsys_state *’ but argument is of type ‘struct cgroup *’ ---------- Signed-off-by: Amit Pundir --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index f98ed648cb58..83b222be7d37 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4881,7 +4881,7 @@ static int mem_cgroup_can_attach(struct cgroup_taskset *tset) static int mem_cgroup_allow_attach(struct cgroup_subsys_state *css, struct cgroup_taskset *tset) { - return subsys_cgroup_allow_attach(css->cgroup, tset); + return subsys_cgroup_allow_attach(css, tset); } static void mem_cgroup_cancel_attach(struct cgroup_taskset *tset) -- 2.34.1