Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15148
b: refs/heads/master
c: 5d5e815
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Mahoney authored and Linus Torvalds committed Dec 15, 2005
1 parent aa387d5 commit be4eef3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea54c96c04cfd9fec881e403d8f7931b47f7b2a6
refs/heads/master: 5d5e815618c4a8b53806845268c951201d14af6e
18 changes: 14 additions & 4 deletions trunk/fs/reiserfs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit be4eef3

Please sign in to comment.