diff options
Diffstat (limited to 'fs/reiserfs/journal.c')
-rw-r--r-- | fs/reiserfs/journal.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 4b15761434bc..68b7b78638ff 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -2757,6 +2757,15 @@ int journal_init(struct super_block *p_s_sb, const char *j_dev_name, | |||
2757 | journal->j_cnode_used = 0; | 2757 | journal->j_cnode_used = 0; |
2758 | journal->j_must_wait = 0; | 2758 | journal->j_must_wait = 0; |
2759 | 2759 | ||
2760 | if (journal->j_cnode_free == 0) { | ||
2761 | reiserfs_warning(p_s_sb, "journal-2004: Journal cnode memory " | ||
2762 | "allocation failed (%ld bytes). Journal is " | ||
2763 | "too large for available memory. Usually " | ||
2764 | "this is due to a journal that is too large.", | ||
2765 | sizeof (struct reiserfs_journal_cnode) * num_cnodes); | ||
2766 | goto free_and_return; | ||
2767 | } | ||
2768 | |||
2760 | init_journal_hash(p_s_sb); | 2769 | init_journal_hash(p_s_sb); |
2761 | jl = journal->j_current_jl; | 2770 | jl = journal->j_current_jl; |
2762 | jl->j_list_bitmap = get_list_bitmap(p_s_sb, jl); | 2771 | jl->j_list_bitmap = get_list_bitmap(p_s_sb, jl); |