Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131281
b: refs/heads/master
c: 8fe4cd0
h: refs/heads/master
i:
  131279: 0a9953c
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Feb 11, 2009
1 parent 954feff commit 107830f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: fc3501d411d34823fb9be248a95a0c44f945866f
refs/heads/master: 8fe4cd0dc5ea43760c59eb256404188272cc95dd
17 changes: 11 additions & 6 deletions trunk/fs/jbd/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ int __log_space_left(journal_t *journal)
}

/*
* Called under j_state_lock. Returns true if a transaction was started.
* Called under j_state_lock. Returns true if a transaction commit was started.
*/
int __log_start_commit(journal_t *journal, tid_t target)
{
Expand Down Expand Up @@ -495,7 +495,8 @@ int journal_force_commit_nested(journal_t *journal)

/*
* Start a commit of the current running transaction (if any). Returns true
* if a transaction was started, and fills its tid in at *ptid
* if a transaction is going to be committed (or is currently already
* committing), and fills its tid in at *ptid
*/
int journal_start_commit(journal_t *journal, tid_t *ptid)
{
Expand All @@ -505,15 +506,19 @@ int journal_start_commit(journal_t *journal, tid_t *ptid)
if (journal->j_running_transaction) {
tid_t tid = journal->j_running_transaction->t_tid;

ret = __log_start_commit(journal, tid);
if (ret && ptid)
__log_start_commit(journal, tid);
/* There's a running transaction and we've just made sure
* it's commit has been scheduled. */
if (ptid)
*ptid = tid;
} else if (journal->j_committing_transaction && ptid) {
ret = 1;
} else if (journal->j_committing_transaction) {
/*
* If ext3_write_super() recently started a commit, then we
* have to wait for completion of that transaction
*/
*ptid = journal->j_committing_transaction->t_tid;
if (ptid)
*ptid = journal->j_committing_transaction->t_tid;
ret = 1;
}
spin_unlock(&journal->j_state_lock);
Expand Down

0 comments on commit 107830f

Please sign in to comment.