aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r--fs/ecryptfs/inode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index a07441a0a878..ffa2be57804d 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -173,7 +173,7 @@ ecryptfs_do_create(struct inode *directory_inode,
173 inode = ERR_CAST(lower_dir_dentry); 173 inode = ERR_CAST(lower_dir_dentry);
174 goto out; 174 goto out;
175 } 175 }
176 rc = vfs_create(lower_dir_dentry->d_inode, lower_dentry, mode, NULL); 176 rc = vfs_create(lower_dir_dentry->d_inode, lower_dentry, mode, true);
177 if (rc) { 177 if (rc) {
178 printk(KERN_ERR "%s: Failure to create dentry in lower fs; " 178 printk(KERN_ERR "%s: Failure to create dentry in lower fs; "
179 "rc = [%d]\n", __func__, rc); 179 "rc = [%d]\n", __func__, rc);
@@ -240,7 +240,6 @@ out:
240 * @dir: The inode of the directory in which to create the file. 240 * @dir: The inode of the directory in which to create the file.
241 * @dentry: The eCryptfs dentry 241 * @dentry: The eCryptfs dentry
242 * @mode: The mode of the new file. 242 * @mode: The mode of the new file.
243 * @nd: nameidata
244 * 243 *
245 * Creates a new file. 244 * Creates a new file.
246 * 245 *
@@ -248,7 +247,7 @@ out:
248 */ 247 */
249static int 248static int
250ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry, 249ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry,
251 umode_t mode, struct nameidata *nd) 250 umode_t mode, bool excl)
252{ 251{
253 struct inode *ecryptfs_inode; 252 struct inode *ecryptfs_inode;
254 int rc; 253 int rc;
@@ -270,8 +269,8 @@ ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry,
270 iput(ecryptfs_inode); 269 iput(ecryptfs_inode);
271 goto out; 270 goto out;
272 } 271 }
273 d_instantiate(ecryptfs_dentry, ecryptfs_inode);
274 unlock_new_inode(ecryptfs_inode); 272 unlock_new_inode(ecryptfs_inode);
273 d_instantiate(ecryptfs_dentry, ecryptfs_inode);
275out: 274out:
276 return rc; 275 return rc;
277} 276}
@@ -374,7 +373,7 @@ static int ecryptfs_lookup_interpose(struct dentry *dentry,
374 */ 373 */
375static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, 374static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode,
376 struct dentry *ecryptfs_dentry, 375 struct dentry *ecryptfs_dentry,
377 struct nameidata *ecryptfs_nd) 376 unsigned int flags)
378{ 377{
379 char *encrypted_and_encoded_name = NULL; 378 char *encrypted_and_encoded_name = NULL;
380 size_t encrypted_and_encoded_name_size; 379 size_t encrypted_and_encoded_name_size;