Re: [PATCH] NFS: Fix RCU warnings in nfs_inode_return_delegation_noreclaim() [ver #2]

Paul E. McKenney
2010-03-30T17:25:44Z

On Tue, Mar 30, 2010 at 07:04:31PM +0200, Eric Dumazet wrote:
> Le mardi 30 mars 2010 =E0 09:49 -0700, Paul E. McKenney a =E9crit :
> > On Tue, Mar 30, 2010 at 05:39:11PM +0100, David Howells wrote:
> > > Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> > >=20
> > > > Scrap this one -- Arnd has it covered, under the much better na=
me
> > > > of rcu_dereference_const().
> > >=20
> > > Not convinced of that name either. That sounds like the RCU dere=
ference of
> > > constant (R/O) data.
> >=20
> > Which it is, as long as the lock is held.
> >=20
> > But what name would you suggest?
> >=20
>=20
> Maybe use 'protected' word or something like that, or 'owned', ...
>=20
> rcu_dereference_protected() or rcu_dereference_owned()

I do like rcu_dereference_protected() -- a bit longer than
rcu_dereference_locked(), but covers the initialization and cleanup
accesses that might be protected by privatization rather than by lockin=
g.

Other thoughts?

Thanx, Paul