Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

jbd2: remove always true condition in __journal_try_to_free_buffer()

The check b_jlist == BJ_None in __journal_try_to_free_buffer() is
always true (__jbd2_journal_temp_unlink_buffer() also checks this in
an assertion) so just remove it.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

authored by

Jan Kara and committed by
Theodore Ts'o
c254c9ec 5bebccf9

+2 -4
+2 -4
fs/jbd2/transaction.c
··· 1676 1676 spin_lock(&journal->j_list_lock); 1677 1677 if (jh->b_cp_transaction != NULL && jh->b_transaction == NULL) { 1678 1678 /* written-back checkpointed metadata buffer */ 1679 - if (jh->b_jlist == BJ_None) { 1680 - JBUFFER_TRACE(jh, "remove from checkpoint list"); 1681 - __jbd2_journal_remove_checkpoint(jh); 1682 - } 1679 + JBUFFER_TRACE(jh, "remove from checkpoint list"); 1680 + __jbd2_journal_remove_checkpoint(jh); 1683 1681 } 1684 1682 spin_unlock(&journal->j_list_lock); 1685 1683 out: