Re: [PATCH 1.5/4] cgroup: delay populate css id

From: KAMEZAWA Hiroyuki
Date: Wed Jan 21 2009 - 21:07:51 EST


On Wed, 21 Jan 2009 19:34:36 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> On Wed, 21 Jan 2009 01:36:32 -0800
> Paul Menage <menage@xxxxxxxxxx> wrote:
>
> > On Mon, Jan 19, 2009 at 9:43 PM, KAMEZAWA Hiroyuki
> > <kamezawa.hiroyu@xxxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/