linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ted Tso <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Anna-Maria Gleixner <anna-maria@linutronix.de>,
	Julia Cartwright <julia@ni.com>, Jan Kara <jack@suse.cz>
Subject: [PATCH 4/7] jbd2: Drop unnecessary branch from jbd2_journal_forget()
Date: Fri,  9 Aug 2019 14:42:30 +0200	[thread overview]
Message-ID: <20190809124233.13277-5-jack@suse.cz> (raw)
In-Reply-To: <20190809124233.13277-1-jack@suse.cz>

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>
---
 fs/jbd2/transaction.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index c4fe050e78c6..9ccef3d6e817 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1596,10 +1596,6 @@ int jbd2_journal_forget (handle_t *handle, struct buffer_head *bh)
 		} 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) {
-- 
2.16.4


  parent reply	other threads:[~2019-08-09 12:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 12:42 [PATCH 0/7 v2] jbd2: Bit spinlock conversions Jan Kara
2019-08-09 12:42 ` [PATCH 1/7] jbd2: Simplify journal_unmap_buffer() Jan Kara
2019-08-09 12:42 ` [PATCH 2/7] jbd2: Remove jbd_trylock_bh_state() Jan Kara
2019-08-09 12:42 ` [PATCH 3/7] jbd2: Move dropping of jh reference out of un/re-filing functions Jan Kara
2019-08-09 12:42 ` Jan Kara [this message]
2019-08-09 12:42 ` [PATCH 5/7] jbd2: Don't call __bforget() unnecessarily Jan Kara
2019-10-28 15:28   ` Theodore Y. Ts'o
2019-10-28 16:01     ` Theodore Y. Ts'o
2019-10-30 11:49       ` Jan Kara
2019-08-09 12:42 ` [PATCH 6/7] jbd2: Make state lock a spinlock Jan Kara
2019-08-09 12:42 ` [PATCH 7/7] jbd2: Free journal head outside of locked region Jan Kara
2019-10-11 12:31 ` [PATCH 0/7 v2] jbd2: Bit spinlock conversions Sebastian Andrzej Siewior
2019-11-03 19:01 ` Theodore Y. Ts'o
  -- strict thread matches above, loose matches on Subject: below --
2019-08-02 15:13 [PATCH 0/7] " Jan Kara
2019-08-02 15:13 ` [PATCH 4/7] jbd2: Drop unnecessary branch from jbd2_journal_forget() Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190809124233.13277-5-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=anna-maria@linutronix.de \
    --cc=julia@ni.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).