diff options
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r-- | fs/ecryptfs/inode.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 11f5e5076aef..d4f02f3e18d7 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -361,8 +361,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
361 | goto out; | 361 | goto out; |
362 | } | 362 | } |
363 | /* Released in this function */ | 363 | /* Released in this function */ |
364 | page_virt = | 364 | page_virt = kmem_cache_zalloc(ecryptfs_header_cache_2, |
365 | (char *)kmem_cache_alloc(ecryptfs_header_cache_2, | ||
366 | GFP_USER); | 365 | GFP_USER); |
367 | if (!page_virt) { | 366 | if (!page_virt) { |
368 | rc = -ENOMEM; | 367 | rc = -ENOMEM; |
@@ -370,7 +369,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
370 | "Cannot ecryptfs_kmalloc a page\n"); | 369 | "Cannot ecryptfs_kmalloc a page\n"); |
371 | goto out_dput; | 370 | goto out_dput; |
372 | } | 371 | } |
373 | memset(page_virt, 0, PAGE_CACHE_SIZE); | 372 | |
374 | rc = ecryptfs_read_header_region(page_virt, lower_dentry, nd->mnt); | 373 | rc = ecryptfs_read_header_region(page_virt, lower_dentry, nd->mnt); |
375 | crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat; | 374 | crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat; |
376 | if (!ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_POLICY_APPLIED)) | 375 | if (!ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_POLICY_APPLIED)) |