1. 20 Mar, 2021 2 commits
    • Al Viro's avatar
      ecryptfs: get rid of unused accessors · 483bc7e8
      Al Viro authored
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      483bc7e8
    • Al Viro's avatar
      ecryptfs: saner API for lock_parent() · b2648d51
      Al Viro authored
      Switch all users of lock_parent() to the approach used by ->unlink()
      and ->rmdir() - instead of playing with dget_parent() of underlying
      dentry of child,
      	* start with ecryptfs dentry of child.
      	* find underlying dentries for that dentry and its parent
      (which is stable, since the parent directory in upper layer is
      held at least shared).  No need to pin them, they are already pinned
      by ecryptfs dentries.
      	* lock the inode of undelying directory of parent
      	* check if it's the parent of underlying dentry of child.
      ->d_parent of underlying dentry of child might be unstable.  However,
      result of its comparison with underlying dentry of parent *is* stable now.
      
      Turn that into replacement of lock_parent(), convert the existing callers
      of lock_parent() to that, along with ecryptfs_unlink() and ecryptfs_rmdir().
      
      Callers need only the underlying dentry of child and inode of underlying
      dentry of parent, so lock_parent() passes those to the caller now.
      Note that underlying directory is locked in any case, success or failure.
      
      That approach does not need a primitive for unlocking - we hadn't grabbed
      any dentry references, so all we need is to unlock the underlying directory
      inode.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      b2648d51
  2. 08 Mar, 2021 1 commit
  3. 06 Mar, 2021 4 commits
  4. 05 Mar, 2021 33 commits