31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

25 Dec, 2016

1 commit


16 Apr, 2015

1 commit


20 Nov, 2014

1 commit


04 Nov, 2014

1 commit


08 Aug, 2014

1 commit

  • There are a few d_obtain_alias callers that are using it to get the
    root of a filesystem which may already have an alias somewhere else.

    This is not the same as the filehandle-lookup case, and none of them
    actually need DCACHE_DISCONNECTED set.

    It isn't really a serious problem, but it would really be clearer if we
    reserved DCACHE_DISCONNECTED for those cases where it's actually needed.

    In the btrfs case this was causing a spurious printk from
    nfsd/nfsfh.c:fh_verify when it found an unexpected DCACHE_DISCONNECTED
    dentry. Josef worked around this by unsetting DCACHE_DISCONNECTED
    manually in 3a0dfa6a12e "Btrfs: unset DCACHE_DISCONNECTED when mounting
    default subvol", and this replaces that workaround.

    Cc: Josef Bacik
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Al Viro

    J. Bruce Fields
     

15 Apr, 2014

1 commit


09 Jun, 2013

1 commit

  • After looking at all of the nfsv4 operations the label structure has been added
    to the prototypes of the functions which can transmit label data.

    Signed-off-by: Matthew N. Dodd
    Signed-off-by: Miguel Rodel Felipe
    Signed-off-by: Phua Eu Gene
    Signed-off-by: Khin Mi Mi Aung
    Signed-off-by: Steve Dickson
    Signed-off-by: Trond Myklebust

    David Quigley
     

18 Feb, 2013

1 commit

  • smatch analysis:

    fs/nfs/getroot.c:130 nfs_get_root() info: redundant null
    check on name calling kfree()

    fs/nfs/unlink.c:272 nfs_async_unlink() info: redundant null
    check on devname_garbage calling kfree()

    Cc: Trond Myklebust
    Cc: linux-nfs@vger.kernel.org
    Signed-off-by: Tim Gardner
    Signed-off-by: Trond Myklebust

    Tim Gardner
     

02 Oct, 2012

1 commit


18 Jul, 2012

1 commit


14 Jul, 2012

1 commit


15 May, 2012

2 commits

  • This patch splits out the NFS v4 specific functionality of
    nfs4_get_root() into its own rpc_op called by the generic client, and
    leaves nfs4_proc_get_rootfh() as its own stand alone function. This
    also allows me to change nfs4_remote_mount(), nfs4_xdev_mount() and
    nfs4_remote_referral_mount() to use the generic client's nfs_get_root()
    function. Later patches in this series will collapse these functions
    into one common function, so using the same get_root() function
    everywhere simplifies future changes.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: Trond Myklebust

    Bryan Schumaker
     
  • This function is really getting the root filehandle and not the root
    dentry of the filesystem. I also removed the rpc_ops lookup from
    nfs4_get_rootfh() under the assumption that if we reach this function
    then we already know we are using NFS v4.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: Trond Myklebust

    Bryan Schumaker
     

29 Mar, 2012

1 commit


21 Mar, 2012

1 commit


25 Mar, 2011

1 commit


23 Mar, 2011

1 commit

  • d_alloc_and_lookup() calls i_op->lookup method due to
    rootfh changes his fsid.

    During mount i_op of NFS root inode is set to
    nfs_mountpoint_inode_operations, if rpc_ops->getroot()
    and rpc_ops->getattr() return different fsid.

    After that nfs_follow_remote_path() raised oops:

    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [< (null)>] (null)

    stack trace:

    d_alloc_and_lookup+0x4c/0x74
    do_lookup+0x1e3/0x280
    link_path_walk+0x12e/0xab0
    nfs4_remote_get_sb+0x56/0x2c0 [nfs]
    path_walk+0x67/0xe0
    vfs_path_lookup+0x8e/0x100
    nfs_follow_remote_path+0x16f/0x3e0 [nfs]
    nfs4_try_mount+0x6f/0xd0 [nfs]
    nfs_get_sb+0x269/0x400 [nfs]
    vfs_kern_mount+0x8a/0x1f0
    do_kern_mount+0x52/0x130
    do_mount+0x20a/0x260
    sys_mount+0x90/0xe0
    system_call_fastpath+0x16/0x1b

    So just refresh fsid, as RFC3530 doesn't specify behavior
    in case of rootfh changes fsid.

    Signed-off-by: Vitaliy Gusev
    Signed-off-by: Trond Myklebust

    Gusev Vitaliy
     

17 Mar, 2011

2 commits

  • part 2: make sure that disconnected roots have corresponding mnt_devname
    values stashed into them.

    Have nfs*_get_root() stuff a copy of devname into ->d_fsdata of the
    found root, provided that it is disconnected.

    Have ->d_release() free it when dentry goes away.

    Have the places where NFS uses ->d_fsdata for sillyrename (and that
    can *never* happen to a disconnected root - dentry will be attached
    to its parent) free old devname copies if they find those.

    Signed-off-by: Al Viro

    Al Viro
     
  • step 1 of ->mnt_devname fixes: make sure we have the value of devname
    available in ..._get_root().

    Signed-off-by: Al Viro

    Al Viro
     

13 Jan, 2011

1 commit


07 Jan, 2011

4 commits

  • dcache_inode_lock can be replaced with per-inode locking. Use existing
    inode->i_lock for this. This is slightly non-trivial because we sometimes
    need to find the inode from the dentry, which requires d_inode to be
    stabilised (either with refcount or d_lock).

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Reduce some branches and memory accesses in dcache lookup by adding dentry
    flags to indicate common d_ops are set, rather than having to check them.
    This saves a pointer memory access (dentry->d_op) in common path lookup
    situations, and saves another pointer load and branch in cases where we
    have d_op but not the particular operation.

    Patched with:

    git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • dcache_lock no longer protects anything. remove it.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Add a new lock, dcache_inode_lock, to protect the inode's i_dentry list
    from concurrent modification. d_alias is also protected by d_lock.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

26 Oct, 2010

1 commit


23 Jun, 2010

1 commit


15 May, 2010

2 commits


09 Jul, 2009

1 commit

  • Fix various silly problems wrt mnt_namespace.h:

    - exit_mnt_ns() isn't used, remove it
    - done that, sched.h and nsproxy.h inclusions aren't needed
    - mount.h inclusion was need for vfsmount_lock, but no longer
    - remove mnt_namespace.h inclusion from files which don't use anything
    from mnt_namespace.h

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

12 Mar, 2009

1 commit


23 Oct, 2008

1 commit


08 Feb, 2008

1 commit


13 Dec, 2007

1 commit

  • Ensure that the dummy 'root dentry' is invisible to d_find_alias(). If not,
    then it may be spliced into the tree if a parent directory from the same
    filesystem gets mounted at a later time.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

18 Nov, 2007

1 commit

  • Since 2.6.18, the superblock sb->s_root has been a dummy dentry with a
    dummy inode. This breaks ustat(), which actually uses sb->s_root in a
    vfstat() call.

    Fix this by making the s_root a dummy alias to the directory inode that was
    used when creating the superblock.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

29 Sep, 2007

1 commit

  • It doesn't look as if the NFS file name limit is being initialised correctly
    in the struct nfs_server. Make sure that we limit whatever is being set in
    nfs_probe_fsinfo() and nfs_init_server().

    Also ensure that readdirplus and nfs4_path_walk respect our file name
    limits.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

10 May, 2007

1 commit


09 May, 2007

1 commit


04 Feb, 2007

1 commit


09 Dec, 2006

1 commit

  • Rename 'struct namespace' to 'struct mnt_namespace' to avoid confusion with
    other namespaces being developped for the containers : pid, uts, ipc, etc.
    'namespace' variables and attributes are also renamed to 'mnt_ns'

    Signed-off-by: Kirill Korotaev
    Signed-off-by: Cedric Le Goater
    Cc: Eric W. Biederman
    Cc: Herbert Poetzl
    Cc: Sukadev Bhattiprolu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Korotaev