diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-12-15 23:35:24 (GMT) |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-12-15 23:35:24 (GMT) |
commit | 2a1e1379bae53f647c463a677cc2ec71b591c348 (patch) | |
tree | a152beb5e8679e94430c5b47bf798dd8a2d4fd5d /fs/reiserfs/journal.c | |
parent | 787926b1b2d21d42ca462dc736b77f1a4a30c503 (diff) | |
parent | 7b6666530e2736f190a2629c8abe34275054449f (diff) | |
download | linux-fsl-qoriq-2a1e1379bae53f647c463a677cc2ec71b591c348.tar.xz |
Merge by hand (conflicts in scsi_lib.c)
This merge is pretty extensive. The conflict is over the new
req->retries parameter, so I had to change the prototype to
scsi_setup_blk_pc_cmnd() and the usage in sd, sr and st.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'fs/reiserfs/journal.c')
-rw-r--r-- | fs/reiserfs/journal.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 68b7b78..3f17ef8 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -1039,6 +1039,10 @@ static int flush_commit_list(struct super_block *s, } atomic_dec(&journal->j_async_throttle); + /* We're skipping the commit if there's an error */ + if (retval || reiserfs_is_journal_aborted(journal)) + barrier = 0; + /* wait on everything written so far before writing the commit * if we are in barrier mode, send the commit down now */ @@ -1077,10 +1081,16 @@ static int flush_commit_list(struct super_block *s, BUG_ON(atomic_read(&(jl->j_commit_left)) != 1); if (!barrier) { - if (buffer_dirty(jl->j_commit_bh)) - BUG(); - mark_buffer_dirty(jl->j_commit_bh); - sync_dirty_buffer(jl->j_commit_bh); + /* If there was a write error in the journal - we can't commit + * this transaction - it will be invalid and, if successful, + * will just end up propogating the write error out to + * the file system. */ + if (likely(!retval && !reiserfs_is_journal_aborted (journal))) { + if (buffer_dirty(jl->j_commit_bh)) + BUG(); + mark_buffer_dirty(jl->j_commit_bh) ; + sync_dirty_buffer(jl->j_commit_bh) ; + } } else wait_on_buffer(jl->j_commit_bh); |