diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 24c767d0b0f4..5575a451508c 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -452,10 +452,13 @@ static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) | |||
452 | struct super_block *sb = journal->j_private; | 452 | struct super_block *sb = journal->j_private; |
453 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 453 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
454 | int error = is_journal_aborted(journal); | 454 | int error = is_journal_aborted(journal); |
455 | struct ext4_journal_cb_entry *jce, *tmp; | 455 | struct ext4_journal_cb_entry *jce; |
456 | 456 | ||
457 | BUG_ON(txn->t_state == T_FINISHED); | ||
457 | spin_lock(&sbi->s_md_lock); | 458 | spin_lock(&sbi->s_md_lock); |
458 | list_for_each_entry_safe(jce, tmp, &txn->t_private_list, jce_list) { | 459 | while (!list_empty(&txn->t_private_list)) { |
460 | jce = list_entry(txn->t_private_list.next, | ||
461 | struct ext4_journal_cb_entry, jce_list); | ||
459 | list_del_init(&jce->jce_list); | 462 | list_del_init(&jce->jce_list); |
460 | spin_unlock(&sbi->s_md_lock); | 463 | spin_unlock(&sbi->s_md_lock); |
461 | jce->jce_func(sb, jce, error); | 464 | jce->jce_func(sb, jce, error); |