Blob Blame History Raw
From: Jan Kara <jack@suse.cz>
Date: Fri, 9 Aug 2019 14:42:30 +0200
Subject: jbd2: Drop unnecessary branch from jbd2_journal_forget()
Patch-mainline: v5.5-rc1
Git-commit: 6d69843e5d3f0c394e1e3004cc2b36efbe402b71
References: bsc#1162702

We have cleared both dirty & jbddirty bits from the bh. So there's no
difference between bforget() and brelse(). Thus there's no point jumping
to no_jbd branch.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20190809124233.13277-5-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
 fs/jbd2/transaction.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1596,10 +1596,6 @@ int jbd2_journal_forget (handle_t *handl
 		} else {
 			__jbd2_journal_unfile_buffer(jh);
 			jbd2_journal_put_journal_head(jh);
-			if (!buffer_jbd(bh)) {
-				spin_unlock(&journal->j_list_lock);
-				goto not_jbd;
-			}
 		}
 		spin_unlock(&journal->j_list_lock);
 	} else if (jh->b_transaction) {