[PATCH] DOCUMENTATION: Correct inline docs to match parm name.

Previous thread: [PATCH 0/3] Series short description by Balbir Singh on Tuesday, November 30, 2010 - 3:14 am. (27 messages)

Next thread: When was ASLR introduced in the Linux kernel? by Victor van der Veen on Tuesday, November 30, 2010 - 4:47 am. (4 messages)
From: Robert P. J. Day
Date: Tuesday, November 30, 2010 - 4:31 am

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

  the actual parameter name is "parent", not "dparent".


diff --git a/fs/dcache.c b/fs/dcache.c
index 23702a9..eaebae4 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1485,7 +1485,7 @@ out:
 /**
  * d_validate - verify dentry provided from insecure source
  * @dentry: The dentry alleged to be valid child of @dparent
- * @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.

-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
--

From: Paul Bolle
Date: Tuesday, November 30, 2010 - 6:19 am

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

--

From: Randy Dunlap
Date: Tuesday, November 30, 2010 - 9:39 am

I've already sent this patch to Al Viro (VFS maintainer).

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--

Previous thread: [PATCH 0/3] Series short description by Balbir Singh on Tuesday, November 30, 2010 - 3:14 am. (27 messages)

Next thread: When was ASLR introduced in the Linux kernel? by Victor van der Veen on Tuesday, November 30, 2010 - 4:47 am. (4 messages)