Commit b1ee3fea authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] jbd: fix I/O error handling

Fix a few buglets spotted by Jeff Mahoney <jeffm@suse.com>.  We're currently
only checking for I/O errors against journal buffers if they were locked when
they were first inspected.

We need to check buffer_uptodate() even if the buffers were already unlocked.
parent 2b38960c
......@@ -543,11 +543,12 @@ void journal_commit_transaction(journal_t *journal)
bh = jh2bh(jh);
if (buffer_locked(bh)) {
wait_on_buffer(bh);
if (unlikely(!buffer_uptodate(bh)))
err = -EIO;
goto wait_for_iobuf;
}
if (unlikely(!buffer_uptodate(bh)))
err = -EIO;
clear_buffer_jwrite(bh);
JBUFFER_TRACE(jh, "ph4: unfile after journal write");
......@@ -603,11 +604,12 @@ void journal_commit_transaction(journal_t *journal)
bh = jh2bh(jh);
if (buffer_locked(bh)) {
wait_on_buffer(bh);
if (unlikely(!buffer_uptodate(bh)))
err = -EIO;
goto wait_for_ctlbuf;
}
if (unlikely(!buffer_uptodate(bh)))
err = -EIO;
BUFFER_TRACE(bh, "ph5: control buffer writeout done: unfile");
clear_buffer_jwrite(bh);
journal_unfile_buffer(journal, jh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment