linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] jbd2: remove pointless assertion in __journal_remove_journal_head
@ 2020-01-23  7:00 Shijie Luo
  2020-01-25  7:26 ` Theodore Y. Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Shijie Luo @ 2020-01-23  7:00 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, jack, luoshijie1

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>
---
 fs/jbd2/journal.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 5e408ee24a1a..56510de63a3d 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2556,7 +2556,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);
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] jbd2: remove pointless assertion in __journal_remove_journal_head
  2020-01-23  7:00 [PATCH v2] jbd2: remove pointless assertion in __journal_remove_journal_head Shijie Luo
@ 2020-01-25  7:26 ` Theodore Y. Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Y. Ts'o @ 2020-01-25  7:26 UTC (permalink / raw)
  To: Shijie Luo; +Cc: linux-ext4, jack

On Thu, Jan 23, 2020 at 02:00:54AM -0500, Shijie Luo wrote:
> 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>

Thanks, applied.

					- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-25  7:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23  7:00 [PATCH v2] jbd2: remove pointless assertion in __journal_remove_journal_head Shijie Luo
2020-01-25  7:26 ` Theodore Y. Ts'o

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).