diff -X /home/nikita/src/linux-git/linux-2.6.git/Documentation/dontdiff -rupbB linux-2.4.24.orig/fs/jbd/commit.c linux-2.4.24/fs/jbd/commit.c --- linux-2.4.24.orig/fs/jbd/commit.c 2005-06-23 17:39:32.000000000 +0400 +++ linux-2.4.24/fs/jbd/commit.c 2005-06-23 15:56:05.000000000 +0400 @@ -47,7 +47,7 @@ void journal_commit_transaction(journal_ struct buffer_head *wbuf[64]; int bufs; int flags; - int err; + int err = 0; unsigned long blocknr; char *tagp = NULL; journal_header_t *header; @@ -505,6 +505,9 @@ start_journal_io: goto wait_for_iobuf; } + if (unlikely(!buffer_uptodate(bh))) + err = -EIO; + clear_bit(BH_JWrite, &jh2bh(jh)->b_state); JBUFFER_TRACE(jh, "ph4: unfile after journal write"); @@ -566,6 +569,9 @@ start_journal_io: goto wait_for_ctlbuf; } + if (unlikely(!buffer_uptodate(bh))) + err = -EIO; + BUFFER_TRACE(bh, "ph5: control buffer writeout done: unfile"); clear_bit(BH_JWrite, &bh->b_state); journal_unfile_buffer(jh); @@ -610,6 +616,8 @@ start_journal_io: bh->b_end_io = journal_end_buffer_io_sync; submit_bh(WRITE, bh); wait_on_buffer(bh); + if (unlikely(!buffer_uptodate(bh))) + err = -EIO; put_bh(bh); /* One for getblk() */ journal_unlock_journal_head(descriptor); } @@ -621,6 +629,9 @@ start_journal_io: skip_commit: /* The journal should be unlocked by now. */ + if (err) + __journal_abort_hard(journal); + /* Call any callbacks that had been registered for handles in this * transaction. It is up to the callback to free any allocated * memory.