lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 22 Jan 2020 09:50:24 +0100 From: Jan Kara <jack@...e.cz> To: Shijie Luo <luoshijie1@...wei.com> Cc: linux-ext4@...r.kernel.org, tytso@....edu, jack@...e.cz Subject: Re: [PATCH] jbd2: modify assert condition in __journal_remove_journal_head On Wed 22-01-20 02:05:48, Shijie Luo wrote: > Only when jh->b_jcount = 0 in jbd2_journal_put_journal_head, we are allowed > to call __journal_remove_journal_head. > > Signed-off-by: Shijie Luo <luoshijie1@...wei.com> Thanks for the patch. You're right but given that __journal_remove_journal_head() has exactly one caller and that checks for jh->b_jcount == 0 just before calling __journal_remove_journal_head(), I think the assertion is pretty pointless. So I'd rather just remove it completely. Honza > --- > fs/jbd2/journal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c > index 5e408ee24a1a..4f417a7f1ae0 100644 > --- a/fs/jbd2/journal.c > +++ b/fs/jbd2/journal.c > @@ -2556,7 +2556,7 @@ 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_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 > -- Jan Kara <jack@...e.com> SUSE Labs, CR
Powered by blists - more mailing lists