23 Dec, 2009

1 commit


12 Dec, 2009

1 commit

  • By teaching sysfs_revalidate to hide a dentry for
    a sysfs_dirent if the sysfs_dirent has been renamed,
    and by teaching sysfs_lookup to return the original
    dentry if the sysfs dirent has been renamed. I can
    show the results of renames correctly without having to
    update the dcache during the directory rename.

    This massively simplifies the rename logic allowing a lot
    of weird sysfs special cases to be removed along with
    a lot of now unnecesary helper code.

    Acked-by: Tejun Heo
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     

21 Sep, 2009

1 commit


12 Jun, 2009

3 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • New field: nd->root. When pathname resolution wants to know the root,
    check if nd->root.mnt is non-NULL; use nd->root if it is, otherwise
    copy current->fs->root there. After path_walk() is finished, we check
    if we'd got a cached value in nd->root and drop it. Before calling
    path_walk() we should either set nd->root.mnt to NULL *or* copy (and
    pin down) some path to nd->root. In the latter case we won't be
    looking at current->fs->root at all.

    Signed-off-by: Al Viro

    Al Viro
     

09 May, 2009

1 commit


01 Jan, 2009

1 commit


23 Oct, 2008

3 commits


27 Jul, 2008

5 commits


15 Feb, 2008

4 commits

  • * Add path_put() functions for releasing a reference to the dentry and
    vfsmount of a struct path in the right order

    * Switch from path_release(nd) to path_put(&nd->path)

    * Rename dput_path() to path_put_conditional()

    [akpm@linux-foundation.org: fix cifs]
    Signed-off-by: Jan Blunck
    Signed-off-by: Andreas Gruenbacher
    Acked-by: Christoph Hellwig
    Cc:
    Cc: Al Viro
    Cc: Steven French
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • This is the central patch of a cleanup series. In most cases there is no good
    reason why someone would want to use a dentry for itself. This series reflects
    that fact and embeds a struct path into nameidata.

    Together with the other patches of this series
    - it enforced the correct order of getting/releasing the reference count on
    pairs
    - it prepares the VFS for stacking support since it is essential to have a
    struct path in every place where the stack can be traversed
    - it reduces the overall code size:

    without patch series:
    text data bss dec hex filename
    5321639 858418 715768 6895825 6938d1 vmlinux

    with patch series:
    text data bss dec hex filename
    5320026 858418 715768 6894212 693284 vmlinux

    This patch:

    Switch from nd->{dentry,mnt} to nd->path.{dentry,mnt} everywhere.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: fix cifs]
    [akpm@linux-foundation.org: fix smack]
    Signed-off-by: Jan Blunck
    Signed-off-by: Andreas Gruenbacher
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Cc: Casey Schaufler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • Move the definition of struct path into its own header file for further
    patches.

    Signed-off-by: Jan Blunck
    Signed-off-by: Andreas Gruenbacher
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • path_release_on_umount() should only be called from sys_umount(). I merged the
    function into sys_umount() instead of having in in namei.c.

    Signed-off-by: Jan Blunck
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     

14 Feb, 2008

1 commit


17 Oct, 2007

1 commit

  • Try to fix the mess created by sysfs braindamage.

    - refactor code internal to fs/namei.c a little to avoid too much
    duplication:
    o __lookup_hash_kern is renamed back to __lookup_hash
    o the old __lookup_hash goes away, permission checks moves to
    the two callers
    o useless inline qualifiers on above functions go away
    - lookup_one_len_kern loses it's last argument and is renamed to
    lookup_one_noperm to make it's useage a little more clear
    - added kerneldoc comments to describe lookup_one_len aswell as
    lookup_one_noperm and make it very clear that no one should use
    the latter ever.

    Signed-off-by: Christoph Hellwig
    Cc: Josef 'Jeff' Sipek
    Cc: Miklos Szeredi
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

20 Jul, 2007

3 commits

  • Signed-off-by: Josef 'Jeff' Sipek
    Cc: Al Viro
    Acked-by: Christoph Hellwig
    Cc: Trond Myklebust
    Cc: Neil Brown
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef 'Jeff' Sipek
     
  • Signed-off-by: Josef 'Jeff' Sipek
    Cc: Al Viro
    Acked-by: Christoph Hellwig
    Cc: Trond Myklebust
    Cc: Neil Brown
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef 'Jeff' Sipek
     
  • Stackable file systems, among others, frequently need to lookup paths or
    path components starting from an arbitrary point in the namespace
    (identified by a dentry and a vfsmount). Currently, such file systems use
    lookup_one_len, which is frowned upon [1] as it does not pass the lookup
    intent along; not passing a lookup intent, for example, can trigger BUG_ON's
    when stacking on top of NFSv4.

    The first patch introduces a new lookup function to allow lookup starting
    from an arbitrary point in the namespace. This approach has been suggested
    by Christoph Hellwig [2].

    The second patch changes sunrpc to use vfs_path_lookup.

    The third patch changes nfsctl.c to use vfs_path_lookup.

    The fourth patch marks link_path_walk static.

    The fifth, and last patch, unexports path_walk because it is no longer
    unnecessary to call it directly, and using the new vfs_path_lookup is
    cleaner.

    For example, the following snippet of code, looks up "some/path/component"
    in a directory pointed to by parent_{dentry,vfsmnt}:

    err = vfs_path_lookup(parent_dentry, parent_vfsmnt,
    "some/path/component", 0, &nd);
    if (!err) {
    /* exits */

    ...

    /* once done, release the references */
    path_release(&nd);
    } else if (err == -ENOENT) {
    /* doesn't exist */
    } else {
    /* other error */
    }

    VFS functions such as lookup_create can be used on the nameidata structure
    to pass the create intent to the file system.

    Signed-off-by: Josef 'Jeff' Sipek
    Cc: Al Viro
    Acked-by: Christoph Hellwig
    Cc: Trond Myklebust
    Cc: Neil Brown
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef 'Jeff' Sipek
     

28 Apr, 2007

1 commit

  • Prevent permission checking from being performed when the kernel wants to
    unconditionally remove a sysfs group, by introducing an kernel-only variant
    of lookup_one_len(), lookup_one_len_kern().

    Additionally, as sysfs_remove_group() does not check the return value of
    the lookup before using it, a BUG_ON has been added to pinpoint the cause
    of any problems potentially caused by this (and as a form of annotation).

    Signed-off-by: James Morris
    Cc: Nagendra Singh Tomar
    Cc: Tejun Heo
    Cc: Stephen Smalley
    Cc: Eric Paris
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    James Morris
     

09 Dec, 2006

1 commit


01 Oct, 2006

1 commit


30 Sep, 2006

1 commit

  • In the "operation does permission checking" model used by fuse, chdir
    permission is not checked, since there's no chdir method.

    For this case set a lookup flag, which will be passed to ->permission(), so
    fuse can distinguish it from permission checks for other operations.

    Signed-off-by: Miklos Szeredi
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

15 Jul, 2006

1 commit

  • It's way past time to bump it to 8. Everyone had been warned - for
    months now.

    RH kernels have had this for more than a year.

    Signed-off-by: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     

01 Apr, 2006

1 commit


19 Jan, 2006

1 commit

  • Here is a series of patches which introduce in total 13 new system calls
    which take a file descriptor/filename pair instead of a single file
    name. These functions, openat etc, have been discussed on numerous
    occasions. They are needed to implement race-free filesystem traversal,
    they are necessary to implement a virtual per-thread current working
    directory (think multi-threaded backup software), etc.

    We have in glibc today implementations of the interfaces which use the
    /proc/self/fd magic. But this code is rather expensive. Here are some
    results (similar to what Jim Meyering posted before).

    The test creates a deep directory hierarchy on a tmpfs filesystem. Then
    rm -fr is used to remove all directories. Without syscall support I get
    this:

    real 0m31.921s
    user 0m0.688s
    sys 0m31.234s

    With syscall support the results are much better:

    real 0m20.699s
    user 0m0.536s
    sys 0m20.149s

    The interfaces are for obvious reasons currently not much used. But they'll
    be used. coreutils (and Jeff's posixutils) are already using them.
    Furthermore, code like ftw/fts in libc (maybe even glob) will also start using
    them. I expect a patch to make follow soon. Every program which is walking
    the filesystem tree will benefit.

    Signed-off-by: Ulrich Drepper
    Signed-off-by: Alexey Dobriyan
    Cc: Christoph Hellwig
    Cc: Al Viro
    Acked-by: Ingo Molnar
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     

11 Jan, 2006

1 commit


09 Nov, 2005

1 commit

  • ->permission and ->lookup have a struct nameidata * argument these days to
    pass down lookup intents. Unfortunately some callers of lookup_hash don't
    actually pass this one down. For lookup_one_len() we don't have a struct
    nameidata to pass down, but as this function is a library function only
    used by filesystem code this is an acceptable limitation. All other
    callers should pass down the nameidata, so this patch changes the
    lookup_hash interface to only take a struct nameidata argument and derives
    the other two arguments to __lookup_hash from it. All callers already have
    the nameidata argument available so this is not a problem.

    At the same time I'd like to deprecate the lookup_hash interface as there
    are better exported interfaces for filesystem usage. Before it can
    actually be removed I need to fix up rpc_pipefs.

    Signed-off-by: Christoph Hellwig
    Cc: Ram Pai
    Cc: Jeff Mahoney
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

19 Oct, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds