diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ecryptfs/inode.c | 20 | ||||
-rw-r--r-- | fs/ecryptfs/super.c | 1 |
2 files changed, 4 insertions, 17 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 0b1ab016fa2e..5a719180983c 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -120,22 +120,9 @@ ecryptfs_do_create(struct inode *directory_inode, | |||
120 | rc = ecryptfs_create_underlying_file(lower_dir_dentry->d_inode, | 120 | rc = ecryptfs_create_underlying_file(lower_dir_dentry->d_inode, |
121 | ecryptfs_dentry, mode, nd); | 121 | ecryptfs_dentry, mode, nd); |
122 | if (rc) { | 122 | if (rc) { |
123 | struct inode *ecryptfs_inode = ecryptfs_dentry->d_inode; | 123 | printk(KERN_ERR "%s: Failure to create dentry in lower fs; " |
124 | struct ecryptfs_inode_info *inode_info = | 124 | "rc = [%d]\n", __FUNCTION__, rc); |
125 | ecryptfs_inode_to_private(ecryptfs_inode); | 125 | goto out_lock; |
126 | |||
127 | printk(KERN_WARNING "%s: Error creating underlying file; " | ||
128 | "rc = [%d]; checking for existing\n", __FUNCTION__, rc); | ||
129 | if (inode_info) { | ||
130 | mutex_lock(&inode_info->lower_file_mutex); | ||
131 | if (!inode_info->lower_file) { | ||
132 | mutex_unlock(&inode_info->lower_file_mutex); | ||
133 | printk(KERN_ERR "%s: Failure to set underlying " | ||
134 | "file; rc = [%d]\n", __FUNCTION__, rc); | ||
135 | goto out_lock; | ||
136 | } | ||
137 | mutex_unlock(&inode_info->lower_file_mutex); | ||
138 | } | ||
139 | } | 126 | } |
140 | rc = ecryptfs_interpose(lower_dentry, ecryptfs_dentry, | 127 | rc = ecryptfs_interpose(lower_dentry, ecryptfs_dentry, |
141 | directory_inode->i_sb, 0); | 128 | directory_inode->i_sb, 0); |
@@ -451,6 +438,7 @@ static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry) | |||
451 | dentry->d_inode->i_nlink = | 438 | dentry->d_inode->i_nlink = |
452 | ecryptfs_inode_to_lower(dentry->d_inode)->i_nlink; | 439 | ecryptfs_inode_to_lower(dentry->d_inode)->i_nlink; |
453 | dentry->d_inode->i_ctime = dir->i_ctime; | 440 | dentry->d_inode->i_ctime = dir->i_ctime; |
441 | d_drop(dentry); | ||
454 | out_unlock: | 442 | out_unlock: |
455 | unlock_parent(lower_dentry); | 443 | unlock_parent(lower_dentry); |
456 | return rc; | 444 | return rc; |
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index f8cdab2bee3d..4859c4eecd65 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c | |||
@@ -86,7 +86,6 @@ static void ecryptfs_destroy_inode(struct inode *inode) | |||
86 | fput(inode_info->lower_file); | 86 | fput(inode_info->lower_file); |
87 | inode_info->lower_file = NULL; | 87 | inode_info->lower_file = NULL; |
88 | d_drop(lower_dentry); | 88 | d_drop(lower_dentry); |
89 | d_delete(lower_dentry); | ||
90 | } | 89 | } |
91 | } | 90 | } |
92 | mutex_unlock(&inode_info->lower_file_mutex); | 91 | mutex_unlock(&inode_info->lower_file_mutex); |