Fix a few buglets spotted by Jeff Mahoney . 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. --- 25-akpm/fs/jbd/commit.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff -puN fs/jbd/commit.c~jbd-iobuf-error-handling-fix fs/jbd/commit.c --- 25/fs/jbd/commit.c~jbd-iobuf-error-handling-fix 2004-04-03 02:59:56.767722936 -0800 +++ 25-akpm/fs/jbd/commit.c 2004-04-03 02:59:56.770722480 -0800 @@ -543,11 +543,12 @@ wait_for_iobuf: 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 @@ wait_for_iobuf: 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); _