Messages in this thread | | | Date | Thu, 22 Jan 2009 11:06:32 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | Re: [PATCH 1.5/4] cgroup: delay populate css id |
| |
On Wed, 21 Jan 2009 19:34:36 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Wed, 21 Jan 2009 01:36:32 -0800 > Paul Menage <menage@google.com> wrote: > > > On Mon, Jan 19, 2009 at 9:43 PM, KAMEZAWA Hiroyuki > > <kamezawa.hiroyu@jp.fujitsu.com> wrote: > > > +static void populate_css_id(struct cgroup_subsys_state *css) > > > +{ > > > + struct css_id *id = rcu_dereference(css->id); > > > + if (id) > > > + rcu_assign_pointer(id->css, css); > > > +} > > > > I don't think this needs to be split out into a separate function. > ok. > > > Also, there's no need for an rcu_dereference(), since we're holding > > cgroup_mutex. > > > Sure. I'll fix. >
BTW, isn't it better to use rcu_assign_pointer to show "this pointer will be dereferenced from RCU-read-side" ?
-Kame
| |