aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-25 06:11:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-25 06:11:02 -0400
commit59e52534172d845ebffb0d7e85fc56fb7b857051 (patch)
tree49552e03f1bdb413cd8b5f7542e91770688d7047 /fs/reiserfs
parent73692d9bb58ecc2fa73f4b2bfcf6eadaa6d49a26 (diff)
parent0d89e54c8249645404283436d952afc261a04e1e (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (59 commits) MAINTAINERS: linux-m32r is moderated for non-subscribers linux@lists.openrisc.net is moderated for non-subscribers Drop default from "DM365 codec select" choice parisc: Kconfig: cleanup Kernel page size default Kconfig: remove redundant CONFIG_ prefix on two symbols cris: remove arch/cris/arch-v32/lib/nand_init.S microblaze: add missing CONFIG_ prefixes h8300: drop puzzling Kconfig dependencies MAINTAINERS: microblaze-uclinux@itee.uq.edu.au is moderated for non-subscribers tty: drop superfluous dependency in Kconfig ARM: mxc: fix Kconfig typo 'i.MX51' Fix file references in Kconfig files aic7xxx: fix Kconfig references to READMEs Fix file references in drivers/ide/ thinkpad_acpi: Fix printk typo 'bluestooth' bcmring: drop commented out line in Kconfig btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888' doc: raw1394: Trivial typo fix CIFS: Don't free volume_info->UNC until we are entirely done with it. treewide: Correct spelling of successfully in comments ...
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/journal.c9
-rw-r--r--fs/reiserfs/resize.c4
2 files changed, 4 insertions, 9 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index a159ba5a35e7..eb711060a6f2 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -291,14 +291,13 @@ int reiserfs_allocate_list_bitmaps(struct super_block *sb,
291 for (i = 0; i < JOURNAL_NUM_BITMAPS; i++) { 291 for (i = 0; i < JOURNAL_NUM_BITMAPS; i++) {
292 jb = jb_array + i; 292 jb = jb_array + i;
293 jb->journal_list = NULL; 293 jb->journal_list = NULL;
294 jb->bitmaps = vmalloc(mem); 294 jb->bitmaps = vzalloc(mem);
295 if (!jb->bitmaps) { 295 if (!jb->bitmaps) {
296 reiserfs_warning(sb, "clm-2000", "unable to " 296 reiserfs_warning(sb, "clm-2000", "unable to "
297 "allocate bitmaps for journal lists"); 297 "allocate bitmaps for journal lists");
298 failed = 1; 298 failed = 1;
299 break; 299 break;
300 } 300 }
301 memset(jb->bitmaps, 0, mem);
302 } 301 }
303 if (failed) { 302 if (failed) {
304 free_list_bitmaps(sb, jb_array); 303 free_list_bitmaps(sb, jb_array);
@@ -353,11 +352,10 @@ static struct reiserfs_journal_cnode *allocate_cnodes(int num_cnodes)
353 if (num_cnodes <= 0) { 352 if (num_cnodes <= 0) {
354 return NULL; 353 return NULL;
355 } 354 }
356 head = vmalloc(num_cnodes * sizeof(struct reiserfs_journal_cnode)); 355 head = vzalloc(num_cnodes * sizeof(struct reiserfs_journal_cnode));
357 if (!head) { 356 if (!head) {
358 return NULL; 357 return NULL;
359 } 358 }
360 memset(head, 0, num_cnodes * sizeof(struct reiserfs_journal_cnode));
361 head[0].prev = NULL; 359 head[0].prev = NULL;
362 head[0].next = head + 1; 360 head[0].next = head + 1;
363 for (i = 1; i < num_cnodes; i++) { 361 for (i = 1; i < num_cnodes; i++) {
@@ -2685,14 +2683,13 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
2685 * dependency inversion warnings. 2683 * dependency inversion warnings.
2686 */ 2684 */
2687 reiserfs_write_unlock(sb); 2685 reiserfs_write_unlock(sb);
2688 journal = SB_JOURNAL(sb) = vmalloc(sizeof(struct reiserfs_journal)); 2686 journal = SB_JOURNAL(sb) = vzalloc(sizeof(struct reiserfs_journal));
2689 if (!journal) { 2687 if (!journal) {
2690 reiserfs_warning(sb, "journal-1256", 2688 reiserfs_warning(sb, "journal-1256",
2691 "unable to get memory for journal structure"); 2689 "unable to get memory for journal structure");
2692 reiserfs_write_lock(sb); 2690 reiserfs_write_lock(sb);
2693 return 1; 2691 return 1;
2694 } 2692 }
2695 memset(journal, 0, sizeof(struct reiserfs_journal));
2696 INIT_LIST_HEAD(&journal->j_bitmap_nodes); 2693 INIT_LIST_HEAD(&journal->j_bitmap_nodes);
2697 INIT_LIST_HEAD(&journal->j_prealloc_list); 2694 INIT_LIST_HEAD(&journal->j_prealloc_list);
2698 INIT_LIST_HEAD(&journal->j_working_list); 2695 INIT_LIST_HEAD(&journal->j_working_list);
diff --git a/fs/reiserfs/resize.c b/fs/reiserfs/resize.c
index b6b9b1fe33b0..7483279b482d 100644
--- a/fs/reiserfs/resize.c
+++ b/fs/reiserfs/resize.c
@@ -111,15 +111,13 @@ int reiserfs_resize(struct super_block *s, unsigned long block_count_new)
111 /* allocate additional bitmap blocks, reallocate array of bitmap 111 /* allocate additional bitmap blocks, reallocate array of bitmap
112 * block pointers */ 112 * block pointers */
113 bitmap = 113 bitmap =
114 vmalloc(sizeof(struct reiserfs_bitmap_info) * bmap_nr_new); 114 vzalloc(sizeof(struct reiserfs_bitmap_info) * bmap_nr_new);
115 if (!bitmap) { 115 if (!bitmap) {
116 /* Journal bitmaps are still supersized, but the memory isn't 116 /* Journal bitmaps are still supersized, but the memory isn't
117 * leaked, so I guess it's ok */ 117 * leaked, so I guess it's ok */
118 printk("reiserfs_resize: unable to allocate memory.\n"); 118 printk("reiserfs_resize: unable to allocate memory.\n");
119 return -ENOMEM; 119 return -ENOMEM;
120 } 120 }
121 memset(bitmap, 0,
122 sizeof(struct reiserfs_bitmap_info) * bmap_nr_new);
123 for (i = 0; i < bmap_nr; i++) 121 for (i = 0; i < bmap_nr; i++)
124 bitmap[i] = old_bitmap[i]; 122 bitmap[i] = old_bitmap[i];
125 123