aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ecryptfs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 63e6ec0e8b50..9d1a22d62765 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -71,15 +71,19 @@ ecryptfs_create_underlying_file(struct inode *lower_dir_inode,
71 struct vfsmount *lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry); 71 struct vfsmount *lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
72 struct dentry *dentry_save; 72 struct dentry *dentry_save;
73 struct vfsmount *vfsmount_save; 73 struct vfsmount *vfsmount_save;
74 unsigned int flags_save;
74 int rc; 75 int rc;
75 76
76 dentry_save = nd->path.dentry; 77 dentry_save = nd->path.dentry;
77 vfsmount_save = nd->path.mnt; 78 vfsmount_save = nd->path.mnt;
79 flags_save = nd->flags;
78 nd->path.dentry = lower_dentry; 80 nd->path.dentry = lower_dentry;
79 nd->path.mnt = lower_mnt; 81 nd->path.mnt = lower_mnt;
82 nd->flags &= ~LOOKUP_OPEN;
80 rc = vfs_create(lower_dir_inode, lower_dentry, mode, nd); 83 rc = vfs_create(lower_dir_inode, lower_dentry, mode, nd);
81 nd->path.dentry = dentry_save; 84 nd->path.dentry = dentry_save;
82 nd->path.mnt = vfsmount_save; 85 nd->path.mnt = vfsmount_save;
86 nd->flags = flags_save;
83 return rc; 87 return rc;
84} 88}
85 89