lkml.org 
[lkml]   [2009]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2009-01-22 03:09    [W:0.052 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site