jbd2: remove pointless assertion in __journal_remove_journal_head
authorShijie Luo <luoshijie1@huawei.com>
Thu, 23 Jan 2020 07:00:54 +0000 (02:00 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 25 Jan 2020 07:25:56 +0000 (02:25 -0500)
Only when jh->b_jcount = 0 in jbd2_journal_put_journal_head, we are allowed
to call __journal_remove_journal_head. This assertion is meaningless,
just remove it.

Signed-off-by: Shijie Luo <luoshijie1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200123070054.50585-1-luoshijie1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/journal.c

index 069b22eba7955f6ca7b1e6c6cfdf8eb265be6967..1c61491fd86f8015c6c2d330dc49cc3915775b07 100644 (file)
@@ -2560,7 +2560,6 @@ static void __journal_remove_journal_head(struct buffer_head *bh)
 {
        struct journal_head *jh = bh2jh(bh);
 
-       J_ASSERT_JH(jh, jh->b_jcount >= 0);
        J_ASSERT_JH(jh, jh->b_transaction == NULL);
        J_ASSERT_JH(jh, jh->b_next_transaction == NULL);
        J_ASSERT_JH(jh, jh->b_cp_transaction == NULL);