aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/reiserfs/journal.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 2f8a7e7b8dab..a059879667b1 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -2758,11 +2758,18 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
2758 struct reiserfs_journal *journal; 2758 struct reiserfs_journal *journal;
2759 struct reiserfs_journal_list *jl; 2759 struct reiserfs_journal_list *jl;
2760 char b[BDEVNAME_SIZE]; 2760 char b[BDEVNAME_SIZE];
2761 int ret;
2761 2762
2763 /*
2764 * Unlock here to avoid various RECLAIM-FS-ON <-> IN-RECLAIM-FS
2765 * dependency inversion warnings.
2766 */
2767 reiserfs_write_unlock(sb);
2762 journal = SB_JOURNAL(sb) = vmalloc(sizeof(struct reiserfs_journal)); 2768 journal = SB_JOURNAL(sb) = vmalloc(sizeof(struct reiserfs_journal));
2763 if (!journal) { 2769 if (!journal) {
2764 reiserfs_warning(sb, "journal-1256", 2770 reiserfs_warning(sb, "journal-1256",
2765 "unable to get memory for journal structure"); 2771 "unable to get memory for journal structure");
2772 reiserfs_write_lock(sb);
2766 return 1; 2773 return 1;
2767 } 2774 }
2768 memset(journal, 0, sizeof(struct reiserfs_journal)); 2775 memset(journal, 0, sizeof(struct reiserfs_journal));
@@ -2771,10 +2778,12 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
2771 INIT_LIST_HEAD(&journal->j_working_list); 2778 INIT_LIST_HEAD(&journal->j_working_list);
2772 INIT_LIST_HEAD(&journal->j_journal_list); 2779 INIT_LIST_HEAD(&journal->j_journal_list);
2773 journal->j_persistent_trans = 0; 2780 journal->j_persistent_trans = 0;
2774 if (reiserfs_allocate_list_bitmaps(sb, 2781 ret = reiserfs_allocate_list_bitmaps(sb, journal->j_list_bitmap,
2775 journal->j_list_bitmap, 2782 reiserfs_bmap_count(sb));
2776 reiserfs_bmap_count(sb))) 2783 reiserfs_write_lock(sb);
2784 if (ret)
2777 goto free_and_return; 2785 goto free_and_return;
2786
2778 allocate_bitmap_nodes(sb); 2787 allocate_bitmap_nodes(sb);
2779 2788
2780 /* reserved for journal area support */ 2789 /* reserved for journal area support */