aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/mm
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 /arch/ia64/mm
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 'arch/ia64/mm')
-rw-r--r--arch/ia64/mm/init.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 760dda4d5b6e..f225dd72968b 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -176,9 +176,8 @@ ia64_init_addr_space (void)
176 * the problem. When the process attempts to write to the register backing store 176 * the problem. When the process attempts to write to the register backing store
177 * for the first time, it will get a SEGFAULT in this case. 177 * for the first time, it will get a SEGFAULT in this case.
178 */ 178 */
179 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 179 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
180 if (vma) { 180 if (vma) {
181 memset(vma, 0, sizeof(*vma));
182 vma->vm_mm = current->mm; 181 vma->vm_mm = current->mm;
183 vma->vm_start = current->thread.rbs_bot & PAGE_MASK; 182 vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
184 vma->vm_end = vma->vm_start + PAGE_SIZE; 183 vma->vm_end = vma->vm_start + PAGE_SIZE;
@@ -195,9 +194,8 @@ ia64_init_addr_space (void)
195 194
196 /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ 195 /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */
197 if (!(current->personality & MMAP_PAGE_ZERO)) { 196 if (!(current->personality & MMAP_PAGE_ZERO)) {
198 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 197 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
199 if (vma) { 198 if (vma) {
200 memset(vma, 0, sizeof(*vma));
201 vma->vm_mm = current->mm; 199 vma->vm_mm = current->mm;
202 vma->vm_end = PAGE_SIZE; 200 vma->vm_end = PAGE_SIZE;
203 vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); 201 vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT);