Skip to content
  1. Apr 26, 2011
    • Tyler Hicks's avatar
      eCryptfs: Add reference counting to lower files · 332ab16f
      Tyler Hicks authored
      
      
      For any given lower inode, eCryptfs keeps only one lower file open and
      multiplexes all eCryptfs file operations through that lower file. The
      lower file was considered "persistent" and stayed open from the first
      lookup through the lifetime of the inode.
      
      This patch keeps the notion of a single, per-inode lower file, but adds
      reference counting around the lower file so that it is closed when not
      currently in use. If the reference count is at 0 when an operation (such
      as open, create, etc.) needs to use the lower file, a new lower file is
      opened. Since the file is no longer persistent, all references to the
      term persistent file are changed to lower file.
      
      Locking is added around the sections of code that opens the lower file
      and assign the pointer in the inode info, as well as the code the fputs
      the lower file when all eCryptfs users are done with it.
      
      This patch is needed to fix issues, when mounted on top of the NFSv3
      client, where the lower file is left silly renamed until the eCryptfs
      inode is destroyed.
      
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      332ab16f
    • Tyler Hicks's avatar
      eCryptfs: dput dentries returned from dget_parent · dd55c898
      Tyler Hicks authored
      
      
      Call dput on the dentries previously returned by dget_parent() in
      ecryptfs_rename(). This is needed for supported eCryptfs mounts on top
      of the NFSv3 client.
      
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      dd55c898
    • Tyler Hicks's avatar
      eCryptfs: Remove extra d_delete in ecryptfs_rmdir · 35ffa948
      Tyler Hicks authored
      
      
      vfs_rmdir() already calls d_delete() on the lower dentry. That was being
      duplicated in ecryptfs_rmdir() and caused a NULL pointer dereference
      when NFSv3 was the lower filesystem.
      
      Signed-off-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
      35ffa948
  2. Apr 24, 2011
  3. Apr 23, 2011
  4. Apr 22, 2011