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 linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20190801112849.GB31381@hirez.programming.kicks-ass.net> Date: Thu, 1 Aug 2019 13:28:49 +0200 From: Peter Zijlstra <peterz@...radead.org> To: Thomas Gleixner <tglx@...utronix.de> Cc: LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...nel.org>, Sebastian Siewior <bigeasy@...utronix.de>, Anna-Maria Gleixner <anna-maria@...utronix.de>, Steven Rostedt <rostedt@...dmis.org>, Julia Cartwright <julia@...com>, Jan Kara <jack@...e.com>, Theodore Tso <tytso@....edu>, Mark Fasheh <mark@...heh.com>, Joseph Qi <joseph.qi@...ux.alibaba.com>, Joel Becker <jlbec@...lplan.org>, linux-ext4@...r.kernel.org, Jan Kara <jack@...e.cz>, Matthew Wilcox <willy@...radead.org>, Alexander Viro <viro@...iv.linux.org.uk>, linux-fsdevel@...r.kernel.org Subject: Re: [patch V2 6/7] fs/jbd2: Make state lock a spinlock On Thu, Aug 01, 2019 at 03:01:32AM +0200, Thomas Gleixner wrote: > @@ -1931,7 +1932,7 @@ static void __jbd2_journal_temp_unlink_b > transaction_t *transaction; > struct buffer_head *bh = jh2bh(jh); > > - J_ASSERT_JH(jh, jbd_is_locked_bh_state(bh)); > + assert_spin_locked(&jh->state_lock); > transaction = jh->b_transaction; > if (transaction) > assert_spin_locked(&transaction->t_journal->j_list_lock); > @@ -2415,7 +2416,7 @@ void __jbd2_journal_file_buffer(struct j > int was_dirty = 0; > struct buffer_head *bh = jh2bh(jh); > > - J_ASSERT_JH(jh, jbd_is_locked_bh_state(bh)); > + assert_spin_locked(&jh->state_lock); > assert_spin_locked(&transaction->t_journal->j_list_lock); > > J_ASSERT_JH(jh, jh->b_jlist < BJ_Types); > @@ -2500,7 +2501,7 @@ void __jbd2_journal_refile_buffer(struct > int was_dirty, jlist; > struct buffer_head *bh = jh2bh(jh); > > - J_ASSERT_JH(jh, jbd_is_locked_bh_state(bh)); > + assert_spin_locked(&jh->state_lock); > if (jh->b_transaction) > assert_spin_locked(&jh->b_transaction->t_journal->j_list_lock); > Do those want to be: lockdep_assert_held(&jh->state_lock); instead? The difference is of course that lockdep_assert_held() requires the current context to hold the lock, where assert_*_locked() merely checks _someone_ holds it.
Powered by blists - more mailing lists