@@ -291,14 +291,13 @@ int reiserfs_allocate_list_bitmaps(struct super_block *sb,
291291 for (i = 0 ; i < JOURNAL_NUM_BITMAPS ; i ++ ) {
292292 jb = jb_array + i ;
293293 jb -> journal_list = NULL ;
294- jb -> bitmaps = vmalloc (mem );
294+ jb -> bitmaps = vzalloc (mem );
295295 if (!jb -> bitmaps ) {
296296 reiserfs_warning (sb , "clm-2000" , "unable to "
297297 "allocate bitmaps for journal lists" );
298298 failed = 1 ;
299299 break ;
300300 }
301- memset (jb -> bitmaps , 0 , mem );
302301 }
303302 if (failed ) {
304303 free_list_bitmaps (sb , jb_array );
@@ -353,11 +352,10 @@ static struct reiserfs_journal_cnode *allocate_cnodes(int num_cnodes)
353352 if (num_cnodes <= 0 ) {
354353 return NULL ;
355354 }
356- head = vmalloc (num_cnodes * sizeof (struct reiserfs_journal_cnode ));
355+ head = vzalloc (num_cnodes * sizeof (struct reiserfs_journal_cnode ));
357356 if (!head ) {
358357 return NULL ;
359358 }
360- memset (head , 0 , num_cnodes * sizeof (struct reiserfs_journal_cnode ));
361359 head [0 ].prev = NULL ;
362360 head [0 ].next = head + 1 ;
363361 for (i = 1 ; i < num_cnodes ; i ++ ) {
@@ -2685,14 +2683,13 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
26852683 * dependency inversion warnings.
26862684 */
26872685 reiserfs_write_unlock (sb );
2688- journal = SB_JOURNAL (sb ) = vmalloc (sizeof (struct reiserfs_journal ));
2686+ journal = SB_JOURNAL (sb ) = vzalloc (sizeof (struct reiserfs_journal ));
26892687 if (!journal ) {
26902688 reiserfs_warning (sb , "journal-1256" ,
26912689 "unable to get memory for journal structure" );
26922690 reiserfs_write_lock (sb );
26932691 return 1 ;
26942692 }
2695- memset (journal , 0 , sizeof (struct reiserfs_journal ));
26962693 INIT_LIST_HEAD (& journal -> j_bitmap_nodes );
26972694 INIT_LIST_HEAD (& journal -> j_prealloc_list );
26982695 INIT_LIST_HEAD (& journal -> j_working_list );
0 commit comments