Lines Matching defs:jh

30 static inline void __buffer_unlink(struct journal_head *jh)
32 transaction_t *transaction = jh->b_cp_transaction;
34 jh->b_cpnext->b_cpprev = jh->b_cpprev;
35 jh->b_cpprev->b_cpnext = jh->b_cpnext;
36 if (transaction->t_checkpoint_list == jh) {
37 transaction->t_checkpoint_list = jh->b_cpnext;
38 if (transaction->t_checkpoint_list == jh)
150 struct journal_head *jh;
192 jh = transaction->t_checkpoint_list;
193 bh = jh2bh(jh);
195 if (jh->b_transaction != NULL) {
196 transaction_t *t = jh->b_transaction;
250 if (__jbd2_journal_remove_checkpoint(jh) ||
267 transaction->t_checkpoint_list = jh->b_cpnext;
352 static unsigned long journal_shrink_one_cp_list(struct journal_head *jh,
357 struct journal_head *next_jh = jh;
362 if (!jh)
365 last_jh = jh->b_cpprev;
367 jh = next_jh;
368 next_jh = jh->b_cpnext;
371 ret = __jbd2_journal_remove_checkpoint(jh);
373 ret = jbd2_journal_try_remove_checkpoint(jh);
389 } while (jh != last_jh);
550 * The function can free jh and bh.
554 int __jbd2_journal_remove_checkpoint(struct journal_head *jh)
560 JBUFFER_TRACE(jh, "entry");
562 transaction = jh->b_cp_transaction;
564 JBUFFER_TRACE(jh, "not on transaction");
569 JBUFFER_TRACE(jh, "removing from transaction");
571 __buffer_unlink(jh);
572 jh->b_cp_transaction = NULL;
574 jbd2_journal_put_journal_head(jh);
615 int jbd2_journal_try_remove_checkpoint(struct journal_head *jh)
617 struct buffer_head *bh = jh2bh(jh);
619 if (jh->b_transaction)
634 JBUFFER_TRACE(jh, "remove from checkpoint list");
635 return __jbd2_journal_remove_checkpoint(jh);
646 void __jbd2_journal_insert_checkpoint(struct journal_head *jh,
649 JBUFFER_TRACE(jh, "entry");
650 J_ASSERT_JH(jh, buffer_dirty(jh2bh(jh)) || buffer_jbddirty(jh2bh(jh)));
651 J_ASSERT_JH(jh, jh->b_cp_transaction == NULL);
654 jbd2_journal_grab_journal_head(jh2bh(jh));
655 jh->b_cp_transaction = transaction;
658 jh->b_cpnext = jh->b_cpprev = jh;
660 jh->b_cpnext = transaction->t_checkpoint_list;
661 jh->b_cpprev = transaction->t_checkpoint_list->b_cpprev;
662 jh->b_cpprev->b_cpnext = jh;
663 jh->b_cpnext->b_cpprev = jh;
665 transaction->t_checkpoint_list = jh;