[lkml]   [2007]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC] Pack the vfsmount and dentry in nameidata into a struct path
    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.


    Joern's library part 1:
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-02-04 05:23    [W:0.037 / U:4.644 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site