lkml.org 
[lkml]   [2010]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] DOCUMENTATION: Correct inline docs to match parm name.
From
Date
On Tue, 2010-11-30 at 06:31 -0500, Robert P. J. Day wrote:
> @@ -1485,7 +1485,7 @@ out:
> /**
> * d_validate - verify dentry provided from insecure source
> * @dentry: The dentry alleged to be valid child of @dparent

Doesn't this one needs to be changed too?

> - * @dparent: The parent dentry (known to be valid)
> + * @parent: The parent dentry (known to be valid)
> *
> * An insecure source has sent us a dentry, here we verify it and dget() it.
> * This is used by ncpfs in its readdir implementation.

By the way, the code currently reads:

int d_validate(struct dentry *dentry, struct dentry *parent)
{
[...]
rcu_read_lock();
hlist_for_each_entry_rcu(d, node, head, d_hash) {
if (d == dentry) {
dget(dentry);
return 1;
}
}
rcu_read_unlock();
return 0;
}

I know nothing about rcu_read_lock(), but why is there no
rcu_read_unlock() before the "return 1" case?


Paul Bolle



\
 
 \ /
  Last update: 2010-11-30 14:39    [W:0.042 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site