On Sat, 3 February 2007 14:25:37 -0800, Andreas Gruenbacher wrote:
> 
> While we store the (dentry, nameidata) in struct file as a struct path, we do 
> not do so in struct nameidata at the moment. Here is a patch that changes 
> that. The changes are syntactic only; gcc should generate identical code.
> 
> So what is this good for?
> 
> Well, we currently pass around (dentry, vfsmount) pairs in a number of 
> places. 
> With this change, these pairs of objects are embedded in a struct path for 
> all file lookup oprations or open files. We could start passing around struct 
> paths instead of (dentry, vfsmount) pairs, without having to construct 
> temporary struct path objects. This could lead to nice code cleanups. The 
> struct paths could be passed by value or by reference.
> 
> Opinions?

On its own, I don't like this patch too much.  It is just a form of
mental masturbation that complicates the source.

> -     inode = nd.dentry->d_inode;
> +     inode = nd.path.dentry->d_inode;

However, once we start passing struct path by reference, it should
result in a smaller binary.  So if this patch is followed by others, as
you indicated, and the overall result is a measurably smaller binary,
I'm all for it.

Jörn

-- 
Joern's library part 1:
http://lwn.net/Articles/2.6-kernel-api/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to