aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorNikanth Karthikesan <knikanth@suse.de>2009-01-07 21:08:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 11:31:06 -0500
commitf9717d28d673468883df8ac34b47268719ac5a3d (patch)
treeecb16bf21d33c7eaa34bdfb4af3ecfe2ca11a9b6 /mm/memcontrol.c
parent2c26fdd70c3094fa3e84caf9ef434911933d5477 (diff)
memcg: check group leader fix
Remove unnecessary codes (...fragments of not-implemented functionalilty...) Reported-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Hugh Dickins <hugh@veritas.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b9cd57b667d6..b83790083087 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2008,25 +2008,10 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss,
2008 struct cgroup *old_cont, 2008 struct cgroup *old_cont,
2009 struct task_struct *p) 2009 struct task_struct *p)
2010{ 2010{
2011 struct mm_struct *mm;
2012 struct mem_cgroup *mem, *old_mem;
2013
2014 mm = get_task_mm(p);
2015 if (mm == NULL)
2016 return;
2017
2018 mem = mem_cgroup_from_cont(cont);
2019 old_mem = mem_cgroup_from_cont(old_cont);
2020
2021 /* 2011 /*
2022 * Only thread group leaders are allowed to migrate, the mm_struct is 2012 * FIXME: It's better to move charges of this process from old
2023 * in effect owned by the leader 2013 * memcg to new memcg. But it's just on TODO-List now.
2024 */ 2014 */
2025 if (!thread_group_leader(p))
2026 goto out;
2027
2028out:
2029 mmput(mm);
2030} 2015}
2031 2016
2032struct cgroup_subsys mem_cgroup_subsys = { 2017struct cgroup_subsys mem_cgroup_subsys = {