/* Try to acquire jbd_lock_bh_state() against the buffer, when j_list_lock is held. For ranking reasons we must trylock. If we lose, schedule away and return 0. j_list_lock is dropped in this case.  */
static int inverted_lock(journal_t *journal, struct buffer_head *bh)
/* Try to acquire jbd_lock_bh_state() against the buffer, when j_list_lock is held. For ranking reasons we must trylock. If we lose, schedule away and return 0. j_list_lock is dropped in this case.  */
static int inverted_lock(journal_t *journal, struct buffer_head *bh)
{
	if (!jbd_trylock_bh_state(bh)) {
		spin_unlock(&journal->j_list_lock);
		schedule();
		return 0;
	}
	return 1;
}