aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ecryptfs/inode.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index eeb734aea5ba..c3ca12c33ca2 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -318,21 +318,20 @@ static int ecryptfs_lookup_interpose(struct dentry *dentry,
318 struct vfsmount *lower_mnt; 318 struct vfsmount *lower_mnt;
319 int rc = 0; 319 int rc = 0;
320 320
321 lower_mnt = mntget(ecryptfs_dentry_to_lower_mnt(dentry->d_parent));
322 fsstack_copy_attr_atime(dir_inode, lower_dentry->d_parent->d_inode);
323 BUG_ON(!lower_dentry->d_count);
324
325 dentry_info = kmem_cache_alloc(ecryptfs_dentry_info_cache, GFP_KERNEL); 321 dentry_info = kmem_cache_alloc(ecryptfs_dentry_info_cache, GFP_KERNEL);
326 ecryptfs_set_dentry_private(dentry, dentry_info);
327 if (!dentry_info) { 322 if (!dentry_info) {
328 printk(KERN_ERR "%s: Out of memory whilst attempting " 323 printk(KERN_ERR "%s: Out of memory whilst attempting "
329 "to allocate ecryptfs_dentry_info struct\n", 324 "to allocate ecryptfs_dentry_info struct\n",
330 __func__); 325 __func__);
331 dput(lower_dentry); 326 dput(lower_dentry);
332 mntput(lower_mnt);
333 d_drop(dentry);
334 return -ENOMEM; 327 return -ENOMEM;
335 } 328 }
329
330 lower_mnt = mntget(ecryptfs_dentry_to_lower_mnt(dentry->d_parent));
331 fsstack_copy_attr_atime(dir_inode, lower_dentry->d_parent->d_inode);
332 BUG_ON(!lower_dentry->d_count);
333
334 ecryptfs_set_dentry_private(dentry, dentry_info);
336 ecryptfs_set_dentry_lower(dentry, lower_dentry); 335 ecryptfs_set_dentry_lower(dentry, lower_dentry);
337 ecryptfs_set_dentry_lower_mnt(dentry, lower_mnt); 336 ecryptfs_set_dentry_lower_mnt(dentry, lower_mnt);
338 337