]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
jbd2: remove always true condition in __journal_try_to_free_buffer()
authorJan Kara <jack@suse.cz>
Wed, 14 Mar 2012 02:27:44 +0000 (22:27 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 14 Mar 2012 02:27:44 +0000 (22:27 -0400)
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>
fs/jbd2/transaction.c

index 3eb326a54bf1285e19537f7fd43f095d86831eb2..fd052a88e9ecca635bce0cd723e0fab68841039d 100644 (file)
@@ -1676,10 +1676,8 @@ __journal_try_to_free_buffer(journal_t *journal, struct buffer_head *bh)
        spin_lock(&journal->j_list_lock);
        if (jh->b_cp_transaction != NULL && jh->b_transaction == NULL) {
                /* written-back checkpointed metadata buffer */
-               if (jh->b_jlist == BJ_None) {
-                       JBUFFER_TRACE(jh, "remove from checkpoint list");
-                       __jbd2_journal_remove_checkpoint(jh);
-               }
+               JBUFFER_TRACE(jh, "remove from checkpoint list");
+               __jbd2_journal_remove_checkpoint(jh);
        }
        spin_unlock(&journal->j_list_lock);
 out: