diff options
author | Robert P. J. Day <rpjday@mindspring.com> | 2007-02-10 04:45:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:27 -0500 |
commit | c376222960ae91d5ffb9197ee36771aaed1d9f90 (patch) | |
tree | 7f431c42529fec77433d33490bd9f2a8c47ba091 /fs/ecryptfs/crypto.c | |
parent | 1b135431abf5ea92e61bf4e91d93726c7b96da5f (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/crypto.c')
-rw-r--r-- | fs/ecryptfs/crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index a86a55ccf874..75bbfae55081 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -1332,13 +1332,13 @@ int ecryptfs_write_headers(struct dentry *ecryptfs_dentry, | |||
1332 | goto out; | 1332 | goto out; |
1333 | } | 1333 | } |
1334 | /* Released in this function */ | 1334 | /* Released in this function */ |
1335 | page_virt = kmem_cache_alloc(ecryptfs_header_cache_0, GFP_USER); | 1335 | page_virt = kmem_cache_zalloc(ecryptfs_header_cache_0, GFP_USER); |
1336 | if (!page_virt) { | 1336 | if (!page_virt) { |
1337 | ecryptfs_printk(KERN_ERR, "Out of memory\n"); | 1337 | ecryptfs_printk(KERN_ERR, "Out of memory\n"); |
1338 | rc = -ENOMEM; | 1338 | rc = -ENOMEM; |
1339 | goto out; | 1339 | goto out; |
1340 | } | 1340 | } |
1341 | memset(page_virt, 0, PAGE_CACHE_SIZE); | 1341 | |
1342 | rc = ecryptfs_write_headers_virt(page_virt, crypt_stat, | 1342 | rc = ecryptfs_write_headers_virt(page_virt, crypt_stat, |
1343 | ecryptfs_dentry); | 1343 | ecryptfs_dentry); |
1344 | if (unlikely(rc)) { | 1344 | if (unlikely(rc)) { |