summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/journal.c
diff options
context:
space:
mode:
authorJody McIntyre <scjody@modernduck.com>2005-12-16 17:10:35 -0500
committerJody McIntyre <scjody@modernduck.com>2005-12-16 17:10:35 -0500
commit16e842a62a8ffcc2e51def6ef9fd6e0926539bc5 (patch)
tree2cf6c23ab195e68712bca51351c1d37ed950c55d /fs/reiserfs/journal.c
parent525352eb6d355bef6adf597252fc6d04f2dbe66c (diff)
parent42245e65f356ed54fdf7a1f9a0095e0bc40f73a3 (diff)
downloadop-kernel-dev-16e842a62a8ffcc2e51def6ef9fd6e0926539bc5.zip
op-kernel-dev-16e842a62a8ffcc2e51def6ef9fd6e0926539bc5.tar.gz
Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'fs/reiserfs/journal.c')
-rw-r--r--fs/reiserfs/journal.c18
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);
OpenPOWER on IntegriCloud