diff options
Diffstat (limited to 'fs/ecryptfs/file.c')
-rw-r--r-- | fs/ecryptfs/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index c5a2e5298f15..779c3477d93c 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -251,7 +251,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | |||
251 | int lower_flags; | 251 | int lower_flags; |
252 | 252 | ||
253 | /* Released in ecryptfs_release or end of function if failure */ | 253 | /* Released in ecryptfs_release or end of function if failure */ |
254 | file_info = kmem_cache_alloc(ecryptfs_file_info_cache, GFP_KERNEL); | 254 | file_info = kmem_cache_zalloc(ecryptfs_file_info_cache, GFP_KERNEL); |
255 | ecryptfs_set_file_private(file, file_info); | 255 | ecryptfs_set_file_private(file, file_info); |
256 | if (!file_info) { | 256 | if (!file_info) { |
257 | ecryptfs_printk(KERN_ERR, | 257 | ecryptfs_printk(KERN_ERR, |
@@ -259,7 +259,6 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | |||
259 | rc = -ENOMEM; | 259 | rc = -ENOMEM; |
260 | goto out; | 260 | goto out; |
261 | } | 261 | } |
262 | memset(file_info, 0, sizeof(*file_info)); | ||
263 | lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); | 262 | lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); |
264 | crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; | 263 | crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; |
265 | mount_crypt_stat = &ecryptfs_superblock_to_private( | 264 | mount_crypt_stat = &ecryptfs_superblock_to_private( |