[PATCH] dcache: trivial comment fix

Previous thread: [PATCH RFC 0/9] RCU: Preemptible RCU by Paul E. McKenney on Monday, September 10, 2007 - 11:30 am. (58 messages)

Next thread: [RFC] kbuild - introduce vdir to make life easier for x86_64 by Sam Ravnborg on Monday, September 10, 2007 - 12:11 pm. (9 messages)
From: J. Bruce Fields
Date: Monday, September 10, 2007 - 11:46 am

As it stands this comment is confusing, and not quite grammatical.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 fs/dcache.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 678d39d..2bacdf6 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1514,8 +1514,8 @@ static void switch_names(struct dentry *dentry, struct dentry *target)
  * This forceful removal will result in ugly /proc output if
  * somebody holds a file open that got deleted due to a rename.
  * We could be nicer about the deleted file, and let it show
- * up under the name it got deleted rather than the name that
- * deleted it.
+ * up under the name it had before it was deleted rather than
+ * under the original name of the file that was moved on top of it.
  */
  
 /*
-- 
1.5.3

-

From: J. Bruce Fields
Date: Monday, September 10, 2007 - 11:54 am

By the way, on further examination of the code it doesn't actually do
what's described in the case where the target name is large and the
moved-from name is small.  Instead, it reports random garbage (usually
part of a name left over from some other dentry?) as far as I can tell:

from switch_names():


	if (dname_external(target)) {
                if (dname_external(dentry)) {
			...
                } else {
                        /*
                         * dentry:internal, target:external.  Steal target's
                         * storage and make target internal.
                         */
                        dentry->d_name.name = target->d_name.name;
                        target->d_name.name = target->d_iname;

... but target->d_iname could have anything in it, right?

--b.
-

Previous thread: [PATCH RFC 0/9] RCU: Preemptible RCU by Paul E. McKenney on Monday, September 10, 2007 - 11:30 am. (58 messages)

Next thread: [RFC] kbuild - introduce vdir to make life easier for x86_64 by Sam Ravnborg on Monday, September 10, 2007 - 12:11 pm. (9 messages)