Skip to content

Commit

Permalink
jbd commit: fix transaction dropping
Browse files Browse the repository at this point in the history
We have to check that also the second checkpoint list is non-empty before
dropping the transaction.

Signed-off-by: Jan Kara <[email protected]>
Cc: Chuck Ebbert <[email protected]>
Cc: Kirill Korotaev <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jankara authored and Linus Torvalds committed Jul 16, 2007
1 parent 09561f4 commit fe28e42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/jbd/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,8 @@ void journal_commit_transaction(journal_t *journal)
journal->j_committing_transaction = NULL;
spin_unlock(&journal->j_state_lock);

if (commit_transaction->t_checkpoint_list == NULL) {
if (commit_transaction->t_checkpoint_list == NULL &&
commit_transaction->t_checkpoint_io_list == NULL) {
__journal_drop_transaction(journal, commit_transaction);
} else {
if (journal->j_checkpoint_transactions == NULL) {
Expand Down

0 comments on commit fe28e42

Please sign in to comment.