Re: [PATCH 07/14] cgroup: reorganize css init / exit paths

2013-08-12 Thread Tejun Heo
On Mon, Aug 12, 2013 at 10:47:33AM +0800, Li Zefan wrote: > > + /* each css holds a ref to the cgroup and the parent css */ > > dget(dentry); > > percpu_ref_get(>parent->refcnt); > > We called dget() and percpu_ref_get() for each css unconditionally... > > > -

Re: [PATCH 07/14] cgroup: reorganize css init / exit paths

2013-08-12 Thread Tejun Heo
On Mon, Aug 12, 2013 at 10:47:33AM +0800, Li Zefan wrote: + /* each css holds a ref to the cgroup and the parent css */ dget(dentry); percpu_ref_get(css-parent-refcnt); We called dget() and percpu_ref_get() for each css unconditionally... - }

Re: [PATCH 07/14] cgroup: reorganize css init / exit paths

2013-08-11 Thread Li Zefan
> /* invoke ->css_online() on a new CSS and mark it online if successful */ > -static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp) > +static int online_css(struct cgroup_subsys_state *css) > { > - struct cgroup_subsys_state *css = cgroup_css(cgrp, ss->subsys_id); > +

Re: [PATCH 07/14] cgroup: reorganize css init / exit paths

2013-08-11 Thread Li Zefan
/* invoke -css_online() on a new CSS and mark it online if successful */ -static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp) +static int online_css(struct cgroup_subsys_state *css) { - struct cgroup_subsys_state *css = cgroup_css(cgrp, ss-subsys_id); + struct

[PATCH 07/14] cgroup: reorganize css init / exit paths

2013-08-08 Thread Tejun Heo
css (cgroup_subsys_state) lifetime management is about to be restructured. In prepartion, make the following mostly trivial changes. * init_cgroup_css() is renamed to init_css() so that it's consistent with other css handling functions. * alloc_css_id(), online_css() and offline_css() updated

[PATCH 07/14] cgroup: reorganize css init / exit paths

2013-08-08 Thread Tejun Heo
css (cgroup_subsys_state) lifetime management is about to be restructured. In prepartion, make the following mostly trivial changes. * init_cgroup_css() is renamed to init_css() so that it's consistent with other css handling functions. * alloc_css_id(), online_css() and offline_css() updated