Re: [PATCH] dcache: trivial comment fix

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: J. Bruce Fields <bfields@...>
Cc: Andrew Morton <akpm@...>, <linux-kernel@...>
Date: Tuesday, September 11, 2007 - 1:33 pm

On Monday September 10, bfields@fieldses.org wrote:

Right, but not relevant.
The name "switch_names" is somewhat misleading.  It is really
"copyname" or similar.  From the comment at the top:

 * When switching names, the actual string doesn't strictly have to
 * be preserved in the target - because we're dropping the target
 * anyway. As such, we can just do a simple memcpy() to copy over
 * the new name before we switch.

so the apparent name of 'target' after the 'swap' is not important.

The purpose of the assignment
                         target->d_name.name = target->d_iname;
is to make "dname_external(target)" false, that making "target
internal" as the comment says.

static inline int dname_external(struct dentry *dentry)
{
	return dentry->d_name.name != dentry->d_iname;
}

This could possibly be made a little more clear....

NeilBrown
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] dcache: trivial comment fix, Neil Brown, (Tue Sep 11, 1:33 pm)
Re: [PATCH] dcache: trivial comment fix, J. Bruce Fields, (Tue Sep 11, 2:00 pm)