05 Apr, 2014

1 commit

  • Pull renameat2 system call from Miklos Szeredi:
    "This adds a new syscall, renameat2(), which is the same as renameat()
    but with a flags argument.

    The purpose of extending rename is to add cross-rename, a symmetric
    variant of rename, which exchanges the two files. This allows
    interesting things, which were not possible before, for example
    atomically replacing a directory tree with a symlink, etc... This
    also allows overlayfs and friends to operate on whiteouts atomically.

    Andy Lutomirski also suggested a "noreplace" flag, which disables the
    overwriting behavior of rename.

    These two flags, RENAME_EXCHANGE and RENAME_NOREPLACE are only
    implemented for ext4 as an example and for testing"

    * 'cross-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
    ext4: add cross rename support
    ext4: rename: split out helper functions
    ext4: rename: move EMLINK check up
    ext4: rename: create ext4_renament structure for local vars
    vfs: add cross-rename
    vfs: lock_two_nondirectories: allow directory args
    security: add flags to rename hooks
    vfs: add RENAME_NOREPLACE flag
    vfs: add renameat2 syscall
    vfs: rename: use common code for dir and non-dir
    vfs: rename: move d_move() up
    vfs: add d_is_dir()

    Linus Torvalds
     

04 Apr, 2014

1 commit

  • Reclaim will be leaving shadow entries in the page cache radix tree upon
    evicting the real page. As those pages are found from the LRU, an
    iput() can lead to the inode being freed concurrently. At this point,
    reclaim must no longer install shadow pages because the inode freeing
    code needs to ensure the page tree is really empty.

    Add an address_space flag, AS_EXITING, that the inode freeing code sets
    under the tree lock before doing the final truncate. Reclaim will check
    for this flag before installing shadow pages.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Rik van Riel
    Reviewed-by: Minchan Kim
    Cc: Andrea Arcangeli
    Cc: Bob Liu
    Cc: Christoph Hellwig
    Cc: Dave Chinner
    Cc: Greg Thelen
    Cc: Hugh Dickins
    Cc: Jan Kara
    Cc: KOSAKI Motohiro
    Cc: Luigi Semenzato
    Cc: Mel Gorman
    Cc: Metin Doslu
    Cc: Michel Lespinasse
    Cc: Ozgun Erdogan
    Cc: Peter Zijlstra
    Cc: Roman Gushchin
    Cc: Ryan Mallon
    Cc: Tejun Heo
    Cc: Vlastimil Babka
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

01 Apr, 2014

1 commit

  • Add new renameat2 syscall, which is the same as renameat with an added
    flags argument.

    Pass flags to vfs_rename() and to i_op->rename() as well.

    Signed-off-by: Miklos Szeredi
    Reviewed-by: J. Bruce Fields

    Miklos Szeredi
     

25 Jan, 2014

1 commit

  • If ecryptfs_readlink_lower() fails, buf remains an uninitialized
    pointer and passing it nd_set_link() won't do anything good.

    Fixed by switching ecryptfs_readlink_lower() to saner API - make it
    return buf or ERR_PTR(...) and update callers.

    Signed-off-by: Al Viro

    Al Viro
     

23 Nov, 2013

1 commit


15 Nov, 2013

2 commits

  • Use this new function to make code more comprehensible, since we are
    reinitialzing the completion, not initializing.

    [akpm@linux-foundation.org: linux-next resyncs]
    Signed-off-by: Wolfram Sang
    Acked-by: Linus Walleij (personally at LCE13)
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wolfram Sang
     
  • When accessing the lower_file pointer located in private_data of
    eCryptfs files, there is no need to check to see if the private_data
    pointer has been initialized to a non-NULL value. The file->private_data
    and file->private_data->lower_file pointers are always initialized to
    non-NULL values in ecryptfs_open().

    This change quiets a Smatch warning:

    CHECK /var/scm/kernel/linux/fs/ecryptfs/file.c
    fs/ecryptfs/file.c:321 ecryptfs_unlocked_ioctl() error: potential NULL dereference 'lower_file'.
    fs/ecryptfs/file.c:335 ecryptfs_compat_ioctl() error: potential NULL dereference 'lower_file'.

    Signed-off-by: Tyler Hicks
    Reported-by: Dan Carpenter
    Reviewed-by: Geyslan G. Bem
    Cc: Al Viro

    Tyler Hicks
     

13 Nov, 2013

1 commit

  • Pull vfs updates from Al Viro:
    "All kinds of stuff this time around; some more notable parts:

    - RCU'd vfsmounts handling
    - new primitives for coredump handling
    - files_lock is gone
    - Bruce's delegations handling series
    - exportfs fixes

    plus misc stuff all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (101 commits)
    ecryptfs: ->f_op is never NULL
    locks: break delegations on any attribute modification
    locks: break delegations on link
    locks: break delegations on rename
    locks: helper functions for delegation breaking
    locks: break delegations on unlink
    namei: minor vfs_unlink cleanup
    locks: implement delegations
    locks: introduce new FL_DELEG lock flag
    vfs: take i_mutex on renamed file
    vfs: rename I_MUTEX_QUOTA now that it's not used for quotas
    vfs: don't use PARENT/CHILD lock classes for non-directories
    vfs: pull ext4's double-i_mutex-locking into common code
    exportfs: fix quadratic behavior in filehandle lookup
    exportfs: better variable name
    exportfs: move most of reconnect_path to helper function
    exportfs: eliminate unused "noprogress" counter
    exportfs: stop retrying once we race with rename/remove
    exportfs: clear DISCONNECTED on all parents sooner
    exportfs: more detailed comment for path_reconnect
    ...

    Linus Torvalds
     

10 Nov, 2013

1 commit


09 Nov, 2013

4 commits

  • NFSv4 uses leases to guarantee that clients can cache metadata as well
    as data.

    Cc: Mikulas Patocka
    Cc: David Howells
    Cc: Tyler Hicks
    Cc: Dustin Kirkland
    Acked-by: Jeff Layton
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Al Viro

    J. Bruce Fields
     
  • Cc: Tyler Hicks
    Cc: Dustin Kirkland
    Acked-by: Jeff Layton
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Al Viro

    J. Bruce Fields
     
  • Cc: David Howells
    Acked-by: Jeff Layton
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Al Viro

    J. Bruce Fields
     
  • We need to break delegations on any operation that changes the set of
    links pointing to an inode. Start with unlink.

    Such operations also hold the i_mutex on a parent directory. Breaking a
    delegation may require waiting for a timeout (by default 90 seconds) in
    the case of a unresponsive NFS client. To avoid blocking all directory
    operations, we therefore drop locks before waiting for the delegation.
    The logic then looks like:

    acquire locks
    ...
    test for delegation; if found:
    take reference on inode
    release locks
    wait for delegation break
    drop reference on inode
    retry

    It is possible this could never terminate. (Even if we take precautions
    to prevent another delegation being acquired on the same inode, we could
    get a different inode on each retry.) But this seems very unlikely.

    The initial test for a delegation happens after the lock on the target
    inode is acquired, but the directory inode may have been acquired
    further up the call stack. We therefore add a "struct inode **"
    argument to any intervening functions, which we use to pass the inode
    back up to the caller in the case it needs a delegation synchronously
    broken.

    Cc: David Howells
    Cc: Tyler Hicks
    Cc: Dustin Kirkland
    Acked-by: Jeff Layton
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Al Viro

    J. Bruce Fields
     

25 Oct, 2013

7 commits


17 Oct, 2013

1 commit


07 Sep, 2013

2 commits


12 Jul, 2013

1 commit

  • …el/git/tyhicks/ecryptfs

    Pull eCryptfs updates from Tyler Hicks:
    "Code cleanups and improved buffer handling during page crypto
    operations:
    - Remove redundant code by merging some encrypt and decrypt functions
    - Get rid of a helper page allocation during page decryption by using
    in-place decryption
    - Better use of entire pages during page crypto operations
    - Several code cleanups"

    * tag 'ecryptfs-3.11-rc1-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
    Use ecryptfs_dentry_to_lower_path in a couple of places
    eCryptfs: Make extent and scatterlist crypt function parameters similar
    eCryptfs: Collapse crypt_page_offset() into crypt_extent()
    eCryptfs: Merge ecryptfs_encrypt_extent() and ecryptfs_decrypt_extent()
    eCryptfs: Combine page_offset crypto functions
    eCryptfs: Combine encrypt_scatterlist() and decrypt_scatterlist()
    eCryptfs: Decrypt pages in-place
    eCryptfs: Accept one offset parameter in page offset crypto functions
    eCryptfs: Simplify lower file offset calculation
    eCryptfs: Read/write entire page during page IO
    eCryptfs: Use entire helper page during page crypto operations
    eCryptfs: Cocci spatch "memdup.spatch"

    Linus Torvalds
     

10 Jul, 2013

1 commit

  • There are two places in ecryptfs that benefit from using
    ecryptfs_dentry_to_lower_path() instead of separate calls to
    ecryptfs_dentry_to_lower() and ecryptfs_dentry_to_lower_mnt(). Both
    sites use fewer instructions and less stack (determined by examining
    objdump output).

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Tyler Hicks

    Matthew Wilcox
     

05 Jul, 2013

1 commit


29 Jun, 2013

3 commits


08 Jun, 2013

11 commits