]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/ecryptfs/inode.c
Embed a struct path into struct nameidata instead of nd->{dentry,mnt}
[people/ms/linux.git] / fs / ecryptfs / inode.c
index edd1e44e9d474bdb46a5b7820192cef29c95cf92..e2386115210105ecbbb01376a7290d0dd4dbe107 100644 (file)
@@ -77,13 +77,13 @@ ecryptfs_create_underlying_file(struct inode *lower_dir_inode,
        struct vfsmount *vfsmount_save;
        int rc;
 
-       dentry_save = nd->dentry;
-       vfsmount_save = nd->mnt;
-       nd->dentry = lower_dentry;
-       nd->mnt = lower_mnt;
+       dentry_save = nd->path.dentry;
+       vfsmount_save = nd->path.mnt;
+       nd->path.dentry = lower_dentry;
+       nd->path.mnt = lower_mnt;
        rc = vfs_create(lower_dir_inode, lower_dentry, mode, nd);
-       nd->dentry = dentry_save;
-       nd->mnt = vfsmount_save;
+       nd->path.dentry = dentry_save;
+       nd->path.mnt = vfsmount_save;
        return rc;
 }
 
@@ -819,14 +819,14 @@ ecryptfs_permission(struct inode *inode, int mask, struct nameidata *nd)
        int rc;
 
         if (nd) {
-               struct vfsmount *vfsmnt_save = nd->mnt;
-               struct dentry *dentry_save = nd->dentry;
+               struct vfsmount *vfsmnt_save = nd->path.mnt;
+               struct dentry *dentry_save = nd->path.dentry;
 
-               nd->mnt = ecryptfs_dentry_to_lower_mnt(nd->dentry);
-               nd->dentry = ecryptfs_dentry_to_lower(nd->dentry);
+               nd->path.mnt = ecryptfs_dentry_to_lower_mnt(nd->path.dentry);
+               nd->path.dentry = ecryptfs_dentry_to_lower(nd->path.dentry);
                rc = permission(ecryptfs_inode_to_lower(inode), mask, nd);
-               nd->mnt = vfsmnt_save;
-               nd->dentry = dentry_save;
+               nd->path.mnt = vfsmnt_save;
+               nd->path.dentry = dentry_save;
         } else
                rc = permission(ecryptfs_inode_to_lower(inode), mask, NULL);
         return rc;