diff options
Diffstat (limited to 'fs/jbd2/journal.c')
-rw-r--r-- | fs/jbd2/journal.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index fed85388ee86..b7ca3a92a4db 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -78,6 +78,7 @@ EXPORT_SYMBOL(jbd2_journal_errno); | |||
78 | EXPORT_SYMBOL(jbd2_journal_ack_err); | 78 | EXPORT_SYMBOL(jbd2_journal_ack_err); |
79 | EXPORT_SYMBOL(jbd2_journal_clear_err); | 79 | EXPORT_SYMBOL(jbd2_journal_clear_err); |
80 | EXPORT_SYMBOL(jbd2_log_wait_commit); | 80 | EXPORT_SYMBOL(jbd2_log_wait_commit); |
81 | EXPORT_SYMBOL(jbd2_log_start_commit); | ||
81 | EXPORT_SYMBOL(jbd2_journal_start_commit); | 82 | EXPORT_SYMBOL(jbd2_journal_start_commit); |
82 | EXPORT_SYMBOL(jbd2_journal_force_commit_nested); | 83 | EXPORT_SYMBOL(jbd2_journal_force_commit_nested); |
83 | EXPORT_SYMBOL(jbd2_journal_wipe); | 84 | EXPORT_SYMBOL(jbd2_journal_wipe); |
@@ -358,6 +359,10 @@ repeat: | |||
358 | 359 | ||
359 | jbd_unlock_bh_state(bh_in); | 360 | jbd_unlock_bh_state(bh_in); |
360 | tmp = jbd2_alloc(bh_in->b_size, GFP_NOFS); | 361 | tmp = jbd2_alloc(bh_in->b_size, GFP_NOFS); |
362 | if (!tmp) { | ||
363 | jbd2_journal_put_journal_head(new_jh); | ||
364 | return -ENOMEM; | ||
365 | } | ||
361 | jbd_lock_bh_state(bh_in); | 366 | jbd_lock_bh_state(bh_in); |
362 | if (jh_in->b_frozen_data) { | 367 | if (jh_in->b_frozen_data) { |
363 | jbd2_free(tmp, bh_in->b_size); | 368 | jbd2_free(tmp, bh_in->b_size); |
@@ -1248,6 +1253,13 @@ int jbd2_journal_load(journal_t *journal) | |||
1248 | if (jbd2_journal_recover(journal)) | 1253 | if (jbd2_journal_recover(journal)) |
1249 | goto recovery_error; | 1254 | goto recovery_error; |
1250 | 1255 | ||
1256 | if (journal->j_failed_commit) { | ||
1257 | printk(KERN_ERR "JBD2: journal transaction %u on %s " | ||
1258 | "is corrupt.\n", journal->j_failed_commit, | ||
1259 | journal->j_devname); | ||
1260 | return -EIO; | ||
1261 | } | ||
1262 | |||
1251 | /* OK, we've finished with the dynamic journal bits: | 1263 | /* OK, we've finished with the dynamic journal bits: |
1252 | * reinitialise the dynamic contents of the superblock in memory | 1264 | * reinitialise the dynamic contents of the superblock in memory |
1253 | * and reset them on disk. */ | 1265 | * and reset them on disk. */ |