aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2007-10-19 02:39:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:35 -0400
commit7a266e75cf5a1efd20d084408a1b7f1a185496dd (patch)
tree38bdd044ce80fde4804c7a1c29d1f509b95c99e8 /fs/jbd
parentc2a9159cdd8b334a0dfaf69d8b07cd57b5272baa (diff)
jbd: fix commit code to properly abort journal
We should really call journal_abort() and not __journal_abort_hard() in case of errors. The latter call does not record the error in the journal superblock and thus filesystem won't be marked as with errors later (and user could happily mount it without any warning). Signed-off-by: Jan Kara <jack@suse.cz> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jbd')
-rw-r--r--fs/jbd/commit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
index a263d82761df..8f1f2aa5fb39 100644
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -466,7 +466,7 @@ void journal_commit_transaction(journal_t *journal)
466 spin_unlock(&journal->j_list_lock); 466 spin_unlock(&journal->j_list_lock);
467 467
468 if (err) 468 if (err)
469 __journal_abort_hard(journal); 469 journal_abort(journal, err);
470 470
471 journal_write_revoke_records(journal, commit_transaction); 471 journal_write_revoke_records(journal, commit_transaction);
472 472
@@ -524,7 +524,7 @@ void journal_commit_transaction(journal_t *journal)
524 524
525 descriptor = journal_get_descriptor_buffer(journal); 525 descriptor = journal_get_descriptor_buffer(journal);
526 if (!descriptor) { 526 if (!descriptor) {
527 __journal_abort_hard(journal); 527 journal_abort(journal, -EIO);
528 continue; 528 continue;
529 } 529 }
530 530
@@ -557,7 +557,7 @@ void journal_commit_transaction(journal_t *journal)
557 and repeat this loop: we'll fall into the 557 and repeat this loop: we'll fall into the
558 refile-on-abort condition above. */ 558 refile-on-abort condition above. */
559 if (err) { 559 if (err) {
560 __journal_abort_hard(journal); 560 journal_abort(journal, err);
561 continue; 561 continue;
562 } 562 }
563 563
@@ -748,7 +748,7 @@ wait_for_iobuf:
748 err = -EIO; 748 err = -EIO;
749 749
750 if (err) 750 if (err)
751 __journal_abort_hard(journal); 751 journal_abort(journal, err);
752 752
753 /* End of a transaction! Finally, we can do checkpoint 753 /* End of a transaction! Finally, we can do checkpoint
754 processing: any buffers committed as a result of this 754 processing: any buffers committed as a result of this