|
@@ -2715,9 +2715,7 @@ static int mem_cgroup_move_parent(struct page *page,
|
|
|
unsigned long uninitialized_var(flags);
|
|
|
int ret;
|
|
|
|
|
|
- /* Is ROOT ? */
|
|
|
- if (mem_cgroup_is_root(child))
|
|
|
- return -EINVAL;
|
|
|
+ VM_BUG_ON(mem_cgroup_is_root(child));
|
|
|
|
|
|
ret = -EBUSY;
|
|
|
if (!get_page_unless_zero(page))
|
|
@@ -3823,6 +3821,8 @@ static int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int event)
|
|
|
struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
|
|
|
int ret;
|
|
|
|
|
|
+ if (mem_cgroup_is_root(memcg))
|
|
|
+ return -EINVAL;
|
|
|
css_get(&memcg->css);
|
|
|
ret = mem_cgroup_force_empty(memcg);
|
|
|
css_put(&memcg->css);
|