aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/inode.c
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@mindspring.com>2007-02-10 04:45:03 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:27 -0500
commitc376222960ae91d5ffb9197ee36771aaed1d9f90 (patch)
tree7f431c42529fec77433d33490bd9f2a8c47ba091 /fs/ecryptfs/inode.c
parent1b135431abf5ea92e61bf4e91d93726c7b96da5f (diff)
[PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc().
Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the corresponding "kmem_cache_zalloc()" call. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andi Kleen <ak@muc.de> Cc: Roland McGrath <roland@redhat.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Acked-by: Joel Becker <Joel.Becker@oracle.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Jan Kara <jack@ucw.cz> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: James Morris <jmorris@namei.org> Cc: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r--fs/ecryptfs/inode.c5
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))