diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 60bb365f54a52efb8ff859ff746ac1af201bb7d2..78900a1252b28ad7dfda5e7141b3cc49460b0d47 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1821,11 +1821,11 @@ __journal_try_to_free_buffer(journal_t *journal, struct buffer_head *bh) if (buffer_locked(bh) || buffer_dirty(bh)) goto out; - if (jh->b_next_transaction != NULL) + if (jh->b_next_transaction != NULL || jh->b_transaction != NULL) goto out; spin_lock(&journal->j_list_lock); - if (jh->b_cp_transaction != NULL && jh->b_transaction == NULL) { + if (jh->b_cp_transaction != NULL) { /* written-back checkpointed metadata buffer */ JBUFFER_TRACE(jh, "remove from checkpoint list"); __jbd2_journal_remove_checkpoint(jh);