aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 07d92b84f448..916132a29b36 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2715,9 +2715,7 @@ static int mem_cgroup_move_parent(struct page *page,
2715 unsigned long uninitialized_var(flags); 2715 unsigned long uninitialized_var(flags);
2716 int ret; 2716 int ret;
2717 2717
2718 /* Is ROOT ? */ 2718 VM_BUG_ON(mem_cgroup_is_root(child));
2719 if (mem_cgroup_is_root(child))
2720 return -EINVAL;
2721 2719
2722 ret = -EBUSY; 2720 ret = -EBUSY;
2723 if (!get_page_unless_zero(page)) 2721 if (!get_page_unless_zero(page))
@@ -3823,6 +3821,8 @@ static int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int event)
3823 struct mem_cgroup *memcg = mem_cgroup_from_cont(cont); 3821 struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
3824 int ret; 3822 int ret;
3825 3823
3824 if (mem_cgroup_is_root(memcg))
3825 return -EINVAL;
3826 css_get(&memcg->css); 3826 css_get(&memcg->css);
3827 ret = mem_cgroup_force_empty(memcg); 3827 ret = mem_cgroup_force_empty(memcg);
3828 css_put(&memcg->css); 3828 css_put(&memcg->css);