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/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]