Re: [PATCH 5/6] memcg: make mem_cgroup_reparent_charges non failing

Michal Hocko
2012-10-18T08:42:16Z

On Thu 18-10-12 16:30:19, Li Zefan wrote:
> > static int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int event)
> > @@ -5013,13 +5011,9 @@ free_out:
> > static int mem_cgroup_pre_destroy(struct cgroup *cont)
> > {
> > struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
> > - int ret;
> >
> > - css_get(&memcg->css);
> > - ret = mem_cgroup_reparent_charges(memcg);
> > - css_put(&memcg->css);
> > -
> > - return ret;
> > + mem_cgroup_reparent_charges(memcg);
> > + return 0;
> > }
> >
>
> Why don't you make pre_destroy() return void?

Yes I plan to do that later after I have feedback for this RFC. I am
especially interested whether the cgroup core patch is OK, resp. has to
be reworked to pull pre_destroy outside of cgroup_lock

Thanks
--
Michal Hocko
SUSE Labs