diff options
Diffstat (limited to 'fs/ecryptfs/file.c')
-rw-r--r-- | fs/ecryptfs/file.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 679817e82484..99259f850e58 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -191,15 +191,13 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | |||
191 | | ECRYPTFS_ENCRYPTED); | 191 | | ECRYPTFS_ENCRYPTED); |
192 | } | 192 | } |
193 | mutex_unlock(&crypt_stat->cs_mutex); | 193 | mutex_unlock(&crypt_stat->cs_mutex); |
194 | if (!ecryptfs_inode_to_private(inode)->lower_file) { | 194 | rc = ecryptfs_init_persistent_file(ecryptfs_dentry); |
195 | rc = ecryptfs_init_persistent_file(ecryptfs_dentry); | 195 | if (rc) { |
196 | if (rc) { | 196 | printk(KERN_ERR "%s: Error attempting to initialize " |
197 | printk(KERN_ERR "%s: Error attempting to initialize " | 197 | "the persistent file for the dentry with name " |
198 | "the persistent file for the dentry with name " | 198 | "[%s]; rc = [%d]\n", __func__, |
199 | "[%s]; rc = [%d]\n", __func__, | 199 | ecryptfs_dentry->d_name.name, rc); |
200 | ecryptfs_dentry->d_name.name, rc); | 200 | goto out_free; |
201 | goto out_free; | ||
202 | } | ||
203 | } | 201 | } |
204 | if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_RDONLY) | 202 | if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_RDONLY) |
205 | && !(file->f_flags & O_RDONLY)) { | 203 | && !(file->f_flags & O_RDONLY)) { |